The centralindex C module allows developers to start using the Central Index API with minimal code. The Central Index is a global data exchange, with a simple REST/JSON api.
- Read up on what Central Index is here http://centralindex.com/
- Read up on the developer API here http://developer.centralindex.com/
- Sign up for a Mashery account, if you don't have one already http://developer.centralindex.com/member/register
- Sign up for an API key here http://developer.centralindex.com/apps/register
You'll need to put the CentralIndex.c and CentralIndex.h file alongside your code together with [http://curl.haxx.se/libcurl/](the libcurl library)
Then your first script could look something like:
int main() {
// set debug mode on
set_debug_mode(1);
// set the api key
set_api_key("<insert api key here>");
// fetch an entity
char *retval = getEntity("379236608286720");
if(retval != NULL) {
printf("%s",retval);
free(retval);
} else {
printf("Failed!");
}
}
See the API Docs for more information.