D++ (DPP)
C++ Discord API Bot Library
dpp::connection Class Reference

The connection object that the user has attached. More...

#include <integration.h>

+ Inheritance diagram for dpp::connection:
+ Collaboration diagram for dpp::connection:

Public Member Functions

 connection ()
 Construct a new connection object. More...
 
connectionfill_from_json (nlohmann::json *j)
 Convert object from nlohmann::json. More...
 
auto to_json (bool with_id=false) const
 Convert object to nlohmann::json. More...
 
std::string build_json (bool with_id=false) const
 Convert object to json string. More...
 

Public Attributes

std::string id
 ID of the connection account. More...
 
std::string name
 the username of the connection account. More...
 
std::string type
 the service of the connection (twitch, youtube, discord, or guild_subscription). More...
 
bool revoked
 Optional: whether the connection is revoked. More...
 
std::vector< integrationintegrations
 Optional: an array of partial server integrations. More...
 
bool verified
 Whether the connection is verified. More...
 
bool friend_sync
 Whether friend sync is enabled for this connection. More...
 
bool show_activity
 Whether activities related to this connection will be shown in presence updates. More...
 
bool two_way_link
 Whether this connection has a corresponding third party OAuth2 token. More...
 
bool visible
 Visibility of this connection. More...
 

Protected Member Functions

connectionfill_from_json_impl (nlohmann::json *j)
 

Friends

struct json_interface< connection >
 

Detailed Description

The connection object that the user has attached.

Constructor & Destructor Documentation

◆ connection()

dpp::connection::connection ( )

Construct a new connection object.

Member Function Documentation

◆ build_json()

std::string dpp::json_interface< connection >::build_json ( bool  with_id = false) const
inlineinherited

Convert object to json string.

Parameters
with_idWhether to include the ID or not
Note
Some fields are conditionally filled, do not rely on all fields being present
Returns
std::string Json built from the structure

◆ fill_from_json()

connection & dpp::json_interface< connection >::fill_from_json ( nlohmann::json *  j)
inlineinherited

Convert object from nlohmann::json.

Parameters
jnlohmann::json object
Returns
T& Reference to self for fluent calling

◆ fill_from_json_impl()

connection & dpp::connection::fill_from_json_impl ( nlohmann::json *  j)
protected

Read class values from json object

Parameters
jA json object to read from
Returns
A reference to self

◆ to_json()

auto dpp::json_interface< connection >::to_json ( bool  with_id = false) const
inlineinherited

Convert object to nlohmann::json.

Parameters
with_idWhether to include the ID or not
Note
Some fields are conditionally filled, do not rely on all fields being present
Returns
json Json built from the structure

Friends And Related Function Documentation

◆ json_interface< connection >

friend struct json_interface< connection >
friend

Member Data Documentation

◆ friend_sync

bool dpp::connection::friend_sync

Whether friend sync is enabled for this connection.

◆ id

std::string dpp::connection::id

ID of the connection account.

◆ integrations

std::vector<integration> dpp::connection::integrations

Optional: an array of partial server integrations.

◆ name

std::string dpp::connection::name

the username of the connection account.

◆ revoked

bool dpp::connection::revoked

Optional: whether the connection is revoked.

◆ show_activity

bool dpp::connection::show_activity

Whether activities related to this connection will be shown in presence updates.

◆ two_way_link

bool dpp::connection::two_way_link

Whether this connection has a corresponding third party OAuth2 token.

◆ type

std::string dpp::connection::type

the service of the connection (twitch, youtube, discord, or guild_subscription).

◆ verified

bool dpp::connection::verified

Whether the connection is verified.

◆ visible

bool dpp::connection::visible

Visibility of this connection.

D++ Library version 10.0.35D++ Library version 10.0.34D++ Library version 10.0.33D++ Library version 10.0.32D++ Library version 10.0.31D++ Library version 10.0.30D++ Library version 10.0.29D++ Library version 10.0.28D++ Library version 10.0.27D++ Library version 10.0.26D++ Library version 10.0.25D++ Library version 10.0.24D++ Library version 10.0.23D++ Library version 10.0.22D++ Library version 10.0.21D++ Library version 10.0.20D++ Library version 10.0.19D++ Library version 10.0.18D++ Library version 10.0.17D++ Library version 10.0.16D++ Library version 10.0.15D++ Library version 10.0.14D++ Library version 10.0.13D++ Library version 10.0.12D++ Library version 10.0.11D++ Library version 10.0.10D++ Library version 10.0.9D++ Library version 10.0.8D++ Library version 10.0.7D++ Library version 10.0.6D++ Library version 10.0.5D++ Library version 10.0.4D++ Library version 10.0.3D++ Library version 10.0.2D++ Library version 10.0.1D++ Library version 10.0.0D++ Library version 9.0.19D++ Library version 9.0.18D++ Library version 9.0.17D++ Library version 9.0.16D++ Library version 9.0.15D++ Library version 9.0.14D++ Library version 9.0.13D++ Library version 9.0.12D++ Library version 9.0.11D++ Library version 9.0.10D++ Library version 9.0.9D++ Library version 9.0.8D++ Library version 9.0.7D++ Library version 9.0.6D++ Library version 9.0.5D++ Library version 9.0.4D++ Library version 9.0.3D++ Library version 9.0.2D++ Library version 9.0.1D++ Library version 9.0.0D++ Library version 1.0.2D++ Library version 1.0.1D++ Library version 1.0.0