Discord.C++ 0.13.0
Loading...
Searching...
No Matches
static.h File Reference
#include <boost/asio/ssl/context.hpp>
#include <nlohmann/json.hpp>
#include <optional>

Go to the source code of this file.

Macros

#define VERSION   "0.13.0"
 
#define GATEWAY_URL   "wss://gateway.discord.gg?v=10&encoding=json&compress=zlib-stream"
 
#define API_PREFIX   "/api/v10"
 
#define DISCORD_HOST   "discord.com"
 
#define DLL_EXPORT
 

Typedefs

using json = nlohmann::json
 

Functions

void hexchar (unsigned char c, unsigned char &hex1, unsigned char &hex2)
 
std::string urlencode (std::string s)
 
void load_ssl_certificates (boost::asio::ssl::context &ssl_context)
 
bool has_value (const json &j, const std::string &key)
 
template<class T >
get_or_else (const json &j, const std::string &key, const T &_default)
 
template<class T >
std::optional< T > get_optional (const json &j, const std::string &key)
 

Macro Definition Documentation

◆ API_PREFIX

#define API_PREFIX   "/api/v10"

◆ DISCORD_HOST

#define DISCORD_HOST   "discord.com"

◆ DLL_EXPORT

#define DLL_EXPORT

◆ GATEWAY_URL

#define GATEWAY_URL   "wss://gateway.discord.gg?v=10&encoding=json&compress=zlib-stream"

◆ VERSION

#define VERSION   "0.13.0"

Typedef Documentation

◆ json

using json = nlohmann::json

Function Documentation

◆ get_optional()

template<class T >
std::optional< T > get_optional ( const json & j,
const std::string & key )

◆ get_or_else()

template<class T >
T get_or_else ( const json & j,
const std::string & key,
const T & _default )

◆ has_value()

bool has_value ( const json & j,
const std::string & key )
inline

◆ hexchar()

void hexchar ( unsigned char c,
unsigned char & hex1,
unsigned char & hex2 )

◆ load_ssl_certificates()

void load_ssl_certificates ( boost::asio::ssl::context & ssl_context)

◆ urlencode()

std::string urlencode ( std::string s)