17 #ifndef MASTODONPP_CONNECTION_HPP
18 #define MASTODONPP_CONNECTION_HPP
22 #include "curl_wrapper.hpp"
23 #include "instance.hpp"
26 #include <string_view>
33 using std::string_view;
99 return get(endpoint, {});
122 const string_view _baseuri;
127 #endif // MASTODONPP_CONNECTION_HPP
answer_type get(const endpoint_variant &endpoint, const parametermap ¶meters)
Make a HTTP GET call with parameters.
Definition: connection.cpp:29
map< string_view, variant< string_view, vector< string_view > >> parametermap
std::map of parameters for API calls.
Definition: curl_wrapper.hpp:69
void set_proxy(string_view proxy)
Set the proxy to use.
Definition: connection.cpp:45
Connection(Instance &instance)
Construct a new Connection object.
Definition: connection.cpp:24
answer_type get(const endpoint_variant &endpoint)
Make a HTTP GET call.
Definition: connection.hpp:97
C++ wrapper for the Mastodon API.
Definition: answer.cpp:19
variant< API::endpoint_type, string_view > endpoint_variant
An endpoint. Either API::endpoint_type or std::string_view.
Definition: connection.hpp:41
Return type for Requests.
Definition: answer.hpp:40
Holds the access data of an instance.
Definition: instance.hpp:40
Represents a connection to an instance. Used for requests.
Definition: connection.hpp:50
Handles the details of network connections.
Definition: curl_wrapper.hpp:80
string get_new_stream_contents()
Copy new stream contents and delete the “original”.
Definition: connection.cpp:51