D++ (DPP)
C++ Discord API Bot Library
|
Represents the various information from the 'get gateway bot' api call. More...
Public Member Functions | |
gateway (nlohmann::json *j) | |
Construct a new gateway object. More... | |
gateway () | |
Construct a new gateway object. More... | |
template<typename U = T, typename = decltype(std::declval<U&>().fill_from_json_impl(std::declval<nlohmann::json*>()))> | |
T & | fill_from_json (nlohmann::json *j) |
Convert object from nlohmann::json. More... | |
template<typename U = T, typename = decltype(std::declval<U&>().to_json_impl(bool{}))> | |
auto | to_json (bool with_id=false) const |
Convert object to nlohmann::json. More... | |
template<typename U = T, typename = decltype(std::declval<U&>().to_json_impl(bool{}))> | |
std::string | build_json (bool with_id=false) const |
Convert object to json string. More... | |
Public Attributes | |
std::string | url |
Gateway websocket url. More... | |
uint32_t | shards |
Number of suggested shards to start. More... | |
uint32_t | session_start_total |
Total number of sessions that can be started. More... | |
uint32_t | session_start_remaining |
How many sessions are left. More... | |
uint32_t | session_start_reset_after |
How many seconds until the session start quota resets. More... | |
uint32_t | session_start_max_concurrency |
How many sessions can be started at the same time. More... | |
Protected Member Functions | |
gateway & | fill_from_json_impl (nlohmann::json *j) |
Fill this object from json. More... | |
Friends | |
struct | json_interface< gateway > |
Represents the various information from the 'get gateway bot' api call.
dpp::gateway::gateway | ( | nlohmann::json * | j | ) |
Construct a new gateway object.
j | JSON data to construct from |
dpp::gateway::gateway | ( | ) |
Construct a new gateway object.
|
inlineinherited |
Convert object to json string.
with_id | Whether to include the ID or not |
|
inlineinherited |
Convert object from nlohmann::json.
j | nlohmann::json object |
|
protected |
Fill this object from json.
j | json to fill from |
|
inlineinherited |
Convert object to nlohmann::json.
with_id | Whether to include the ID or not |
|
friend |
uint32_t dpp::gateway::session_start_max_concurrency |
How many sessions can be started at the same time.
uint32_t dpp::gateway::session_start_remaining |
How many sessions are left.
uint32_t dpp::gateway::session_start_reset_after |
How many seconds until the session start quota resets.
uint32_t dpp::gateway::session_start_total |
Total number of sessions that can be started.
uint32_t dpp::gateway::shards |
Number of suggested shards to start.
std::string dpp::gateway::url |
Gateway websocket url.