D++ (DPP)
C++ Discord API Bot Library
dpp::confirmation_callback_t Struct Reference

The results of a REST call wrapped in a convenient struct. More...

#include <cluster.h>

+ Collaboration diagram for dpp::confirmation_callback_t:

Public Member Functions

 confirmation_callback_t ()=default
 Construct a new confirmation callback t object. More...
 
 confirmation_callback_t (const std::string &_type, const confirmable_t &_value, const http_request_completion_t &_http)
 Construct a new confirmation callback object. More...
 
bool is_error () const
 Returns true if the call resulted in an error rather than a legitimate value in the confirmation_callback_t::value member. More...
 
error_info get_error () const
 Get the error_info object. The error_info object contains the details of any REST error, if there is an error (to find out if there is an error check confirmation_callback_t::is_error()) More...
 

Public Attributes

std::string type
 
http_request_completion_t http_info
 
confirmable_t value
 

Detailed Description

The results of a REST call wrapped in a convenient struct.

Constructor & Destructor Documentation

◆ confirmation_callback_t() [1/2]

dpp::confirmation_callback_t::confirmation_callback_t ( )
default

Construct a new confirmation callback t object.

◆ confirmation_callback_t() [2/2]

dpp::confirmation_callback_t::confirmation_callback_t ( const std::string &  _type,
const confirmable_t _value,
const http_request_completion_t _http 
)

Construct a new confirmation callback object.

Parameters
_typeThe type of callback that is encapsulated in the confirmable_t
_valueThe value to encapsulate in the confirmable_t
_httpThe HTTP metadata from the REST call

Member Function Documentation

◆ get_error()

error_info dpp::confirmation_callback_t::get_error ( ) const

Get the error_info object. The error_info object contains the details of any REST error, if there is an error (to find out if there is an error check confirmation_callback_t::is_error())

Returns
error_info The details of the error message

◆ is_error()

bool dpp::confirmation_callback_t::is_error ( ) const

Returns true if the call resulted in an error rather than a legitimate value in the confirmation_callback_t::value member.

Returns
true There was an error who's details can be obtained by get_error()
false There was no error

Member Data Documentation

◆ http_info

http_request_completion_t dpp::confirmation_callback_t::http_info

Information about the HTTP call used to make the request

◆ type

std::string dpp::confirmation_callback_t::type

Returned data type in confirmable_t, used to double check to avoid an exception if you wish

◆ value

confirmable_t dpp::confirmation_callback_t::value

Value returned, wrapped in variant

D++ 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