#ifndef __GS_CLIENT_H #define __GS_CLIENT_H typedef struct { char *server; char *client_id; char *client_secret; char *access_token; } GSClient; /* * Create new GSClient with server url, client_id and client_secret returned * from gs_register call. * It will add `http://` prefix to server if it doesn't exists. */ GSClient *gs_client_new(const char *server, const char *client_id, const char *client_secret); /* Generic helper fuction to make http calls */ void *gs_client_do_api(GSClient *c, int method, const char *url, const char *req); /* Set user access_token */ void gs_client_set_token(GSClient *c, const char *access_token); /* Free GSClient */ void gs_client_free(GSClient *c); #endif