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()
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:99
uint8_t error_code
Error code.
Definition: return_types.hpp:41
uint16_t http_error_code
HTTP error code.
Definition: return_types.hpp:55
string error_message
The error message, or "".
Definition: return_types.hpp:48
◆ 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:99
◆ 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: