17 #ifndef MASTODONPP_INSTANCE_HPP
18 #define MASTODONPP_INSTANCE_HPP
20 #include "curl_wrapper.hpp"
24 #include <string_view>
32 using std::string_view;
55 explicit Instance(string_view hostname, string_view access_token);
102 _access_token = move(access_token);
138 const string _hostname;
139 const string _baseuri;
140 string _access_token;
147 #endif // MASTODONPP_INSTANCE_HPP
string_view get_proxy() const
Returns the proxy string that was previously set.
Definition: instance.hpp:132
string_view get_access_token() const
Returns the access token.
Definition: instance.hpp:87
C++ wrapper for the Mastodon API.
Definition: answer.cpp:22
uint64_t get_max_chars()
Returns the maximum number of characters per post.
Definition: instance.cpp:33
void set_access_token(string access_token)
Set OAuth 2.0 Bearer Access Token.
Definition: instance.hpp:100
Instance(string_view hostname, string_view access_token)
Construct a new Instance object.
Definition: instance.cpp:26
void set_proxy(string_view proxy)
Set the proxy to use.
Definition: curl_wrapper.cpp:67
void set_proxy(const string_view proxy)
Set the proxy to use.
Definition: instance.hpp:118
string_view get_baseuri() const
Returns the base URI.
Definition: instance.hpp:76
Holds the access data of an instance.
Definition: instance.hpp:42
Handles the details of network connections.
Definition: curl_wrapper.hpp:91
string_view get_hostname() const
Returns the hostname.
Definition: instance.hpp:63