2016-07-10 01:18:13 +01:00
|
|
|
#ifndef BOT_APIHELPER
|
|
|
|
#define BOT_APIHELPER
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include "json/json.hpp"
|
|
|
|
|
|
|
|
using json = nlohmann::json;
|
|
|
|
|
|
|
|
class HTTPHelper;
|
|
|
|
|
|
|
|
class APIHelper {
|
|
|
|
public:
|
|
|
|
APIHelper();
|
|
|
|
|
|
|
|
void send_message(std::string channel_id, std::string message);
|
|
|
|
|
|
|
|
private:
|
2016-07-10 19:17:35 +01:00
|
|
|
const std::string BASE_URL;
|
|
|
|
const std::string CHANNELS_URL;
|
|
|
|
const std::string TOKEN;
|
|
|
|
const std::string TOKEN_PARAM;
|
|
|
|
const std::string JSON_CTYPE;
|
2016-07-10 01:18:13 +01:00
|
|
|
|
|
|
|
HTTPHelper *http;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|