2#define VERSION "0.13.0"
4#define GATEWAY_URL "wss://gateway.discord.gg?v=10&encoding=json&compress=zlib-stream"
5#define API_PREFIX "/api/v10"
6#define DISCORD_HOST "discord.com"
9#define DLL_EXPORT __declspec(dllexport)
14#include <boost/asio/ssl/context.hpp>
15#include <nlohmann/json.hpp>
18using json = nlohmann::json;
20DLL_EXPORT void hexchar(
unsigned char c,
unsigned char& hex1,
unsigned char& hex2);
26 return j.count(key) > 0 && !j.at(key).is_null();
31 if (j.count(key) == 0 || j.at(key).is_null())
34 return j.at(key).get<T>();
39 if (j.count(key) == 0 || j.at(key).is_null())
42 return std::make_optional<T>(j.at(key).get<T>());
#define DLL_EXPORT
Definition static.h:11
bool has_value(const json &j, const std::string &key)
Definition static.h:25
void load_ssl_certificates(boost::asio::ssl::context &ssl_context)
Definition static.cpp:41
std::string urlencode(std::string s)
Definition static.cpp:16
std::optional< T > get_optional(const json &j, const std::string &key)
Definition static.h:38
nlohmann::json json
Definition static.h:18
void hexchar(unsigned char c, unsigned char &hex1, unsigned char &hex2)
Definition static.cpp:9
T get_or_else(const json &j, const std::string &key, const T &_default)
Definition static.h:30