more prototypes, defined a max api_key_len (need to confirm this)
reading the jansson docs, I have written/copied (not tested) our GET request to riot
added checking of the curl code after the call
added return type int