Created
May 25, 2016 01:52
-
-
Save lettergram/8a6a54d5324928a668f7915edbf4a812 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef CAPI_H | |
#define CAPI_H | |
#include <iostream> | |
#include <string> | |
#include <stdio.h> | |
#include <curl/curl.h> | |
class capi { | |
public: | |
capi(std::string base_url); | |
~capi(); | |
/* REST API Calls */ | |
std::string get(std::string end_point); | |
std::string post(std::string end_point); | |
std::string patch(std::string end_point, std::string data); | |
/* Get/Set */ | |
void set_base_url(std::string base_url); | |
std::string get_base_url(); | |
void set_auth_token(std::string token); | |
std::string get_auth_token(); | |
void set_obj_id(std::string id); | |
std::string get_obj_id(); | |
private: | |
std::string root_url; | |
std::string auth_token; | |
std::string obj_id; | |
}; | |
#endif // CAPI_H |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment