D++ (DPP)
C++ Discord API Bot Library
Loading...
Searching...
No Matches
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.
std::string build_json (bool with_id=false) const
 Convert object to json string.
connectionfill_from_json (nlohmann::json *j)
 Convert object from nlohmann::json.
auto to_json (bool with_id=false) const
 Convert object to nlohmann::json.

Public Attributes

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

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

◆ 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 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