mastodon-cpp  0.104.0
Public Member Functions | Public Attributes | List of all members
Mastodon::return_base Struct Reference

Basis for return types. More...

#include <return_types.hpp>

Inheritance diagram for Mastodon::return_base:
Mastodon::Easy::return_entity< T > Mastodon::Easy::return_entity_vector< T > Mastodon::return_call

Public Member Functions

 operator bool ()
 true if return_base::error_code is 0, otherwise false. More...
 
 operator uint8_t ()
 Same as return_base::error_code. More...
 

Public Attributes

uint8_t error_code = 0
 Error code. More...
 
string error_message
 The error message, or "". More...
 
uint16_t http_error_code = 0
 HTTP error code. More...
 

Detailed Description

Basis for return types.

Since
0.100.0

Member Function Documentation

◆ operator bool()

return_base::operator bool ( )

true if return_base::error_code is 0, otherwise false.

Since
0.100.0
22 {
23  if (error_code == 0)
24  {
25  return true;
26  }
27  else
28  {
29  return false;
30  }
31 }
uint8_t error_code
Error code.
Definition: return_types.hpp:41

◆ operator uint8_t()

return_base::operator uint8_t ( )

Same as return_base::error_code.

Since
0.100.0
34 {
35  return error_code;
36 }
uint8_t error_code
Error code.
Definition: return_types.hpp:41

Member Data Documentation

◆ error_code

uint8_t Mastodon::return_base::error_code = 0

◆ error_message

string Mastodon::return_base::error_message

The error message, or "".

Since
0.100.0
Examples:
example01_get_public_timeline.cpp.

◆ http_error_code

uint16_t Mastodon::return_base::http_error_code = 0

HTTP error code.

Since
0.100.0
Examples:
example01_get_public_timeline.cpp.

The documentation for this struct was generated from the following files: