Return type for API calls.
More...
#include <return_types.hpp>
Return type for API calls.
Example:
if (!ret)
{
cout <<
"Error " << std::to_string(ret.
error_code);
}
else
{
cout << ret << endl;
}
- Since
- 0.100.0
- Examples
- example01_get_public_timeline.cpp.
◆ return_call() [1/2]
Mastodon::return_call::return_call |
( |
const uint8_t |
ec, |
|
|
const string & |
em, |
|
|
const uint16_t |
hec, |
|
|
const string & |
a |
|
) |
| |
Return type for Mastodon::API.
- Parameters
-
ec | Error code |
em | Error message |
hec | HTTP error code |
a | Answer |
- Since
- 0.100.0
string answer
The response from the server.
Definition: return_types.hpp:100
uint8_t error_code
Error code.
Definition: return_types.hpp:42
uint16_t http_error_code
HTTP error code.
Definition: return_types.hpp:56
string error_message
The error message, or "".
Definition: return_types.hpp:49
◆ return_call() [2/2]
Mastodon::return_call::return_call |
( |
const error |
ec, |
|
|
const string & |
em, |
|
|
const uint16_t |
hec, |
|
|
const string & |
a |
|
) |
| |
Return type for Mastodon::API.
- Parameters
-
ec | Error code |
em | Error message |
hec | HTTP error code |
a | Answer |
- Since
- 0.110.0
string answer
The response from the server.
Definition: return_types.hpp:100
uint8_t error_code
Error code.
Definition: return_types.hpp:42
uint16_t http_error_code
HTTP error code.
Definition: return_types.hpp:56
string error_message
The error message, or "".
Definition: return_types.hpp:49
◆ operator const string()
Mastodon::return_call::operator const string |
( |
| ) |
const |
Same es return_call::answer.
- Since
- 0.100.0
string answer
The response from the server.
Definition: return_types.hpp:100
◆ operator<<
std::ostream& operator<< |
( |
std::ostream & |
out, |
|
|
const return_call & |
ret |
|
) |
| |
|
friend |
◆ answer
string Mastodon::return_call::answer |
The documentation for this struct was generated from the following files: