mastodonpp
0.0.0
|
Represents a connection to an instance. Used for requests. More...
#include <mastodonpp/connection.hpp>
Public Member Functions | |
Connection (Instance &instance) | |
Construct a new Connection object. More... | |
answer_type | get (const API::endpoint_type &endpoint) |
Make a HTTP GET call. More... | |
answer_type | get (const string_view &endpoint) |
Make a HTTP GET call. More... | |
Public Member Functions inherited from mastodonpp::CURLWrapper | |
CURLWrapper () | |
Initializes curl and sets up connection. More... | |
CURLWrapper (const CURLWrapper &other)=default | |
Copy constructor. More... | |
CURLWrapper (CURLWrapper &&other) noexcept=default | |
Move constructor. More... | |
virtual | ~CURLWrapper () noexcept |
Cleans up curl and connection. More... | |
CURLWrapper & | operator= (const CURLWrapper &other)=default |
Copy assignment operator. More... | |
CURLWrapper & | operator= (CURLWrapper &&other) noexcept=default |
Move assignment operator. More... | |
answer_type | make_request (const http_method &method, const string_view &uri) |
Make a request. More... | |
Represents a connection to an instance. Used for requests.
|
explicit |
answer_type mastodonpp::Connection::get | ( | const API::endpoint_type & | endpoint | ) |
Make a HTTP GET call.
endpoint | Endpoint as API::endpoint_type, for example: mastodonpp::API::v1::instance . |
answer_type mastodonpp::Connection::get | ( | const string_view & | endpoint | ) |
Make a HTTP GET call.
endpoint | Endpoint as string, for example: "/api/v1/instance". |