diff --git a/docs/account_8hpp_source.html b/docs/account_8hpp_source.html
index 12b623e..48dc88d 100644
--- a/docs/account_8hpp_source.html
+++ b/docs/account_8hpp_source.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -47,35 +47,42 @@ $(function() {
account.hpp
-
17 #ifndef MASTODON_CPP_EASY_ACCOUNT_HPP 18 #define MASTODON_CPP_EASY_ACCOUNT_HPP 28 #include "mastodon-cpp.hpp" 29 #include "easy/easy.hpp" 31 #include <mastodon-cpp/mastodon-cpp.hpp> 32 #include <mastodon-cpp/easy/easy.hpp> 36 using std::uint_fast64_t;
37 using std::chrono::system_clock;
63 explicit Account (
const string &json);
72 virtual const bool valid ()
const ;
82 const string acct ()
const ;
89 const string avatar ()
const ;
103 const bool bot ()
const ;
110 const system_clock::time_point
created_at ()
const ;
124 const std::vector<fields_pair>
fields ()
const ;
145 const string header ()
const ;
159 const uint_fast64_t
id ()
const ;
166 const bool locked ()
const ;
188 const string note ()
const ;
223 const string url ()
const ;
234 #endif // MASTODON_CPP_EASY_ACCOUNT_HPP const string avatar() const
Returns URL of avatar.
Definition: account.cpp:61
-
const uint_fast64_t statuses_count() const
Returns number of statuses.
Definition: account.cpp:186
-
const std::vector< fields_pair > fields() const
Returns metadata fields.
Definition: account.cpp:86
-
const string header() const
Returns URL of header image.
Definition: account.cpp:114
-
const system_clock::time_point created_at() const
Returns time of creation.
Definition: account.cpp:76
-
const string avatar_static() const
Returns URL of static avatar.
Definition: account.cpp:66
-
const visibility_type privacy() const
Returns default privacy of new toots.
Definition: account.cpp:165
-
const string note_plain() const
Returns plaintext version of note.
Definition: account.cpp:160
+
17 #ifndef MASTODON_CPP_EASY_ACCOUNT_HPP 18 #define MASTODON_CPP_EASY_ACCOUNT_HPP 28 #include "mastodon-cpp.hpp" 29 #include "easy/easy.hpp" 31 #include <mastodon-cpp/mastodon-cpp.hpp> 32 #include <mastodon-cpp/easy/easy.hpp> 36 using std::uint_fast64_t;
37 using std::chrono::system_clock;
63 explicit Account (
const string &json);
72 virtual const bool valid ()
const ;
82 const string acct ()
const ;
89 const string avatar ()
const ;
112 const bool bot ()
const ;
119 const system_clock::time_point
created_at ()
const ;
140 const std::vector<fields_pair>
fields ()
const ;
168 const string header ()
const ;
191 const uint_fast64_t
id ()
const ;
198 const bool locked ()
const ;
227 const string note ()
const ;
241 [[deprecated(
"Will vanish in 1.0.0. Use source() instead." )]]
273 explicit Source (
const string &json);
282 virtual const bool valid ()
const ;
289 const std::vector<fields_pair>
fields ()
const ;
303 const string note ()
const ;
341 const Source source()
const ;
356 const string url ()
const ;
367 #endif // MASTODON_CPP_EASY_ACCOUNT_HPP const string avatar() const
Returns URL of avatar.
Definition: account.cpp:61
+
const uint_fast64_t statuses_count() const
Returns number of statuses.
Definition: account.cpp:362
+
const std::vector< fields_pair > fields() const
Returns metadata fields.
Definition: account.cpp:98
+
const string header() const
Returns URL of header image.
Definition: account.cpp:141
+
const system_clock::time_point created_at() const
Returns time of creation.
Definition: account.cpp:82
+
const string avatar_static() const
Returns URL of static avatar.
Definition: account.cpp:72
+
const visibility_type privacy() const
Returns default privacy of new toots.
Definition: account.cpp:210
+
const string note_plain() const
Returns plaintext version of note.
Definition: account.cpp:205
+
const std::vector< fields_pair > fields() const
Returns metadata fields.
Definition: account.cpp:244
const string acct() const
Returns username.
Definition: account.cpp:56
-
const bool has_moved() const
Returns true if the account has been moved.
Definition: account.cpp:134
+
const bool has_moved() const
Returns true if the account has been moved.
Definition: account.cpp:173
std::pair< const string, const string > fields_pair
Describes a field. Format: name, value.
Definition: account.hpp:54
-
const uint_fast64_t followers_count() const
Returns number of followers.
Definition: account.cpp:104
-
const string note() const
Returns note.
Definition: account.cpp:155
-
const string header_static() const
Returns URL of static header image.
Definition: account.cpp:119
+
const uint_fast64_t followers_count() const
Returns number of followers.
Definition: account.cpp:131
+
const string note() const
Returns note.
Definition: account.cpp:194
+
const string note() const
Returns note in plain text.
Definition: account.cpp:278
+
Source()
Constructs an empty Account::Source object.
Definition: account.cpp:235
+
const visibility_type privacy() const
Returns default privacy of new toots.
Definition: account.cpp:289
+
const string header_static() const
Returns URL of static header image.
Definition: account.cpp:152
+
virtual const bool valid() const
Returns true if the Entity holds valid data.
Definition: account.cpp:239
visibility_type
Describes visibility of toots.
Definition: easy.hpp:68
-
const uint_fast64_t id() const
Returns account-ID.
Definition: account.cpp:124
-
const string username() const
Returns username (without )
Definition: account.cpp:196
-
const bool locked() const
Returns true if the account is locked.
Definition: account.cpp:129
+
const uint_fast64_t id() const
Returns account-ID.
Definition: account.cpp:157
+
const string username() const
Returns username (without )
Definition: account.cpp:372
+
const bool locked() const
Returns true if the account is locked.
Definition: account.cpp:162
virtual const bool valid() const
Returns true if the Entity holds valid data.
Definition: account.cpp:32
-
const string display_name() const
Returns display name.
Definition: account.cpp:81
+
const string display_name() const
Returns display name.
Definition: account.cpp:87
Class to hold accounts.
Definition: account.hpp:46
-
const Account moved() const
If the owner decided to switch accounts, new account is in this attribute.
Definition: account.cpp:144
-
const bool sensitive() const
Returns if media is marked as sensitive by default.
Definition: account.cpp:181
+
const Account moved() const
If the owner decided to switch accounts, new account is in this attribute.
Definition: account.cpp:183
+
const bool sensitive() const
Returns if media is marked as sensitive by default.
Definition: account.cpp:340
+
const bool sensitive() const
Returns if media is marked as sensitive by default.
Definition: account.cpp:226
Definition: mastodon-cpp.hpp:52
Base class for all entities.
Definition: easy.hpp:304
-
const uint_fast64_t following_count() const
Returns number of people this account follows.
Definition: account.cpp:109
+
Class to hold source attribute.
Definition: account.hpp:263
+
const uint_fast64_t following_count() const
Returns number of people this account follows.
Definition: account.cpp:136
Account()
Constructs an empty Account object.
Definition: account.cpp:28
-
const bool bot() const
Returns true if the account performs automated actions.
Definition: account.cpp:71
-
const string url() const
Returns URL of the profile.
Definition: account.cpp:191
+
const bool bot() const
Returns true if the account performs automated actions.
Definition: account.cpp:77
+
const string url() const
Returns URL of the profile.
Definition: account.cpp:367
diff --git a/docs/application_8hpp_source.html b/docs/application_8hpp_source.html
index 733fa34..a0c3042 100644
--- a/docs/application_8hpp_source.html
+++ b/docs/application_8hpp_source.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/attachment_8hpp_source.html b/docs/attachment_8hpp_source.html
index 92efc77..82200f4 100644
--- a/docs/attachment_8hpp_source.html
+++ b/docs/attachment_8hpp_source.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/card_8hpp_source.html b/docs/card_8hpp_source.html
index 582f65d..9115848 100644
--- a/docs/card_8hpp_source.html
+++ b/docs/card_8hpp_source.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1API-members.html b/docs/classMastodon_1_1API-members.html
index f626de3..4370588 100644
--- a/docs/classMastodon_1_1API-members.html
+++ b/docs/classMastodon_1_1API-members.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1API.html b/docs/classMastodon_1_1API.html
index 6ca2640..a8c98ce 100644
--- a/docs/classMastodon_1_1API.html
+++ b/docs/classMastodon_1_1API.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -310,8 +310,10 @@ Error codes
15 Network error (curlpp exception)
-100 - 999 HTTP status codes
+16 Timeout
+100 - 999 HTTP status codes
+
65535 Unknown error
Since before 0.11.0
@@ -358,7 +360,7 @@ Error codes
A list of all v1 API calls.
The original /
are substituted by _
.
Since before 0.11.0
- 200 accounts_verify_credentials,
201 accounts_id_followers,
202 accounts_id_following,
203 accounts_id_statuses,
204 accounts_relationships,
224 statuses_id_reblogged_by,
225 statuses_id_favourited_by,
228 timelines_tag_hashtag,
229 timelines_list_list_id,
231 accounts_update_credentials,
234 accounts_id_unfollow,
240 follow_requests_id_authorize,
241 follow_requests_id_reject,
245 notifications_dismiss,
248 statuses_id_unreblog,
249 statuses_id_favourite,
250 statuses_id_unfavourite,
260 streaming_public_local,
+ 201 accounts_verify_credentials,
202 accounts_id_followers,
203 accounts_id_following,
204 accounts_id_statuses,
205 accounts_relationships,
225 statuses_id_reblogged_by,
226 statuses_id_favourited_by,
229 timelines_tag_hashtag,
230 timelines_list_list_id,
232 accounts_update_credentials,
235 accounts_id_unfollow,
241 follow_requests_id_authorize,
242 follow_requests_id_reject,
246 notifications_dismiss,
249 statuses_id_unreblog,
250 statuses_id_favourite,
251 statuses_id_unfavourite,
261 streaming_public_local,
@@ -384,7 +386,7 @@ Error codes
A list of all v2 API calls.
The original /
are substituted by _
.
Since 0.16.0
-
+
@@ -590,7 +592,7 @@ Error codes
Returns Error code .
Since before 0.11.0
Examples: example01_dump_json.cpp , example02_parse_account.cpp , example03_mastocron.cpp , example07_register_app.cpp , example08_rate_limiting.cpp , and example15_proxy.cpp .
- 204 return get (call, p, answer);
std::map< string, std::vector< string > > parametermap
Used for passing parameters.
Definition: mastodon-cpp.hpp:188
+
204 return get (call, p, answer);
std::map< string, std::vector< string > > parametermap
Used for passing parameters.
Definition: mastodon-cpp.hpp:189
@@ -637,7 +639,7 @@ Error codes
Returns Error code . If the URL has permanently changed, 13 is returned and answer is set to the new URL.
31 const auto &it = parameters.find(
"id" );
32 if (it != parameters.end())
34 strid = it->second[0];
39 case v1::accounts_verify_credentials:
40 strcall =
"/api/v1/accounts/verify_credentials" ;
43 strcall =
"/api/v1/blocks" ;
45 case v1::domain_blocks:
46 strcall =
"/api/v1/domain_blocks" ;
49 strcall =
"/api/v1/favourites" ;
51 case v1::follow_requests:
52 strcall =
"/api/v1/follow_requests" ;
55 strcall =
"/api/v1/instance" ;
57 case v1::custom_emojis:
58 strcall =
"/api/v1/custom_emojis" ;
61 strcall =
"/api/v1/lists" ;
64 strcall =
"/api/v1/mutes" ;
66 case v1::notifications:
67 strcall =
"/api/v1/notifications" ;
70 strcall =
"/api/v1/reports" ;
72 case v1::timelines_home:
73 strcall =
"/api/v1/timelines/home" ;
75 case v1::timelines_public:
76 strcall =
"/api/v1/timelines/public" ;
78 case v1::accounts_relationships:
79 strcall =
"/api/v1/accounts/relationships" ;
82 strcall =
"/api/v1/accounts/" + strid;
84 case v1::accounts_id_followers:
85 strcall =
"/api/v1/accounts/" + strid +
"/followers" ;
87 case v1::accounts_id_following:
88 strcall =
"/api/v1/accounts/" + strid +
"/following" ;
90 case v1::accounts_id_statuses:
91 strcall =
"/api/v1/accounts/" + strid +
"/statuses" ;
93 case v1::accounts_search:
94 strcall =
"/api/v1/accounts/search" ;
96 case v1::accounts_id_lists:
97 strcall =
"/api/v1/accounts/" + strid +
"/lists" ;
99 case v1::lists_id_accounts:
100 strcall =
"/api/v1/lists/" + strid +
"/accounts" ;
103 strcall =
"/api/v1/lists/" + strid;
105 case v1::notifications_id:
106 strcall =
"/api/v1/notifications/" + strid;
109 strcall =
"/api/v1/search" ;
111 case v1::statuses_id:
112 strcall =
"/api/v1/statuses/" + strid;
114 case v1::statuses_id_context:
115 strcall =
"/api/v1/statuses/" + strid +
"/context" ;
117 case v1::statuses_id_card:
118 strcall =
"/api/v1/statuses/" + strid +
"/card" ;
120 case v1::statuses_id_reblogged_by:
121 strcall =
"/api/v1/statuses/" + strid +
"/reblogged_by" ;
123 case v1::statuses_id_favourited_by:
124 strcall =
"/api/v1/statuses/" + strid +
"/favourited_by" ;
126 case v1::timelines_tag_hashtag:
129 const auto &it = parameters.find(
"hashtag" );
130 if (it != parameters.end())
132 strcall =
"/api/v1/timelines/tag/" +
urlencode (it->second[0]);
136 ttdebug <<
"ERROR: Invalid call.\n" ;
141 case v1::timelines_list_list_id:
142 strcall =
"/api/v1/timelines/list/" + strid;
144 case v1::push_subscription:
145 strcall =
"/api/v1/push/subscription" ;
148 ttdebug <<
"ERROR: Invalid call.\n" ;
153 if (parameters.size() > 0)
157 newparameters.erase(
"id" );
158 newparameters.erase(
"hashtag" );
159 strcall += maptostr(newparameters);
162 return get (strcall, answer);
static const string urlencode(const string &str)
Percent-encodes a string. This is done automatically, unless you make a custom request.
Definition: mastodon-cpp.cpp:141
-
std::map< string, std::vector< string > > parametermap
Used for passing parameters.
Definition: mastodon-cpp.hpp:188
+
std::map< string, std::vector< string > > parametermap
Used for passing parameters.
Definition: mastodon-cpp.hpp:189
@@ -675,7 +677,7 @@ Error codes
Make a GET request which requires parameters.
Since 0.16.0
- 172 const auto &it = parameters.find(
"id" );
173 if (it != parameters.end())
175 strid = it->second[0];
181 strcall =
"/api/v2/search" ;
184 ttdebug <<
"ERROR: Invalid call.\n" ;
189 if (parameters.size() > 0)
193 newparameters.erase(
"id" );
194 newparameters.erase(
"hashtag" );
195 strcall += maptostr(newparameters);
198 return get (strcall, answer);
std::map< string, std::vector< string > > parametermap
Used for passing parameters.
Definition: mastodon-cpp.hpp:188
+
172 const auto &it = parameters.find(
"id" );
173 if (it != parameters.end())
175 strid = it->second[0];
181 strcall =
"/api/v2/search" ;
184 ttdebug <<
"ERROR: Invalid call.\n" ;
189 if (parameters.size() > 0)
193 newparameters.erase(
"id" );
194 newparameters.erase(
"hashtag" );
195 strcall += maptostr(newparameters);
198 return get (strcall, answer);
std::map< string, std::vector< string > > parametermap
Used for passing parameters.
Definition: mastodon-cpp.hpp:189
@@ -744,7 +746,7 @@ Error codes
Returns The header, or "" on error.
Since before 0.11.0
Examples: example08_rate_limiting.cpp .
- 266 size_t startpos = headers.find(header +
':' );
267 if (startpos != std::string::npos)
269 startpos = headers.find(
':' , startpos) + 2;
270 size_t endpos = headers.find(
"\r\n" , startpos);
271 return headers.substr(startpos, endpos - startpos);
const void get_headers(string &headers) const
Get all headers in a string.
Definition: http.cpp:189
+
266 size_t startpos = headers.find(header +
':' );
267 if (startpos != std::string::npos)
269 startpos = headers.find(
':' , startpos) + 2;
270 size_t endpos = headers.find(
"\r\n" , startpos);
271 return headers.substr(startpos, endpos - startpos);
const void get_headers(string &headers) const
Get all headers in a string.
Definition: http.cpp:197
@@ -906,7 +908,7 @@ Error codes
Returns Error code . If the URL has permanently changed, 13 is returned and answer is set to the new URL.
Since before 0.11.0
const uint_fast16_t get_stream(const Mastodon::API::v1 &call, const parametermap ¶meters, string &answer, std::unique_ptr< Mastodon::API::http > &ptr)
Make a streaming GET request.
Definition: get_stream.cpp:24
-
std::map< string, std::vector< string > > parametermap
Used for passing parameters.
Definition: mastodon-cpp.hpp:188
+
std::map< string, std::vector< string > > parametermap
Used for passing parameters.
Definition: mastodon-cpp.hpp:189
@@ -1063,7 +1065,7 @@ Error codes
Since before 0.11.0
Examples: example05_follow_unfollow.cpp , example06_toot_delete-toot.cpp , example10_simplify.cpp , and example11_post_media.cpp .
131 return post (call, p, answer);
const uint_fast16_t post(const Mastodon::API::v1 &call, string &answer)
Make a POST request which doesn't require parameters.
Definition: post.cpp:128
-
std::map< string, std::vector< string > > parametermap
Used for passing parameters.
Definition: mastodon-cpp.hpp:188
+
std::map< string, std::vector< string > > parametermap
Used for passing parameters.
Definition: mastodon-cpp.hpp:189
@@ -1329,7 +1331,7 @@ Error codes
Examples: example07_register_app.cpp .
173 {
"client_name" , { client_name } },
174 {
"redirect_uris" , { redirect_uri } },
175 {
"scopes" , { scopes } },
176 {
"website" , { website } }
180 uint_fast16_t ret =
post (API::v1::apps, parameters, answer);
185 std::regex reid(
"client_id\":\"([0-9a-fA-F]+)\"" );
186 std::regex resecret(
"client_secret\":\"([0-9a-fA-F]+)\"" );
188 std::regex_search(answer, match, reid);
189 client_id = match[1].str();
190 std::regex_search(answer, match, resecret);
191 client_secret = match[1].str();
193 url =
"https://" + _instance +
"/oauth/authorize" +
194 "?scope=" +
urlencode (scopes) +
"&response_type=code" +
195 "&redirect_uri=" +
urlencode (redirect_uri) +
196 "&client_id=" + client_id;
197 if (!website.empty())
211 std::cerr <<
"Error code: " << ret <<
'\n' ;
static const string urlencode(const string &str)
Percent-encodes a string. This is done automatically, unless you make a custom request.
Definition: mastodon-cpp.cpp:141
const uint_fast16_t post(const Mastodon::API::v1 &call, string &answer)
Make a POST request which doesn't require parameters.
Definition: post.cpp:128
-
std::map< string, std::vector< string > > parametermap
Used for passing parameters.
Definition: mastodon-cpp.hpp:188
+
std::map< string, std::vector< string > > parametermap
Used for passing parameters.
Definition: mastodon-cpp.hpp:189
@@ -1395,7 +1397,7 @@ Error codes
Since before 0.11.0
Examples: example07_register_app.cpp .
235 {
"client_id" , { client_id } },
236 {
"client_secret" , { client_secret } },
237 {
"grant_type" , {
"authorization_code" } },
238 {
"redirect_uri" , { redirect_uri } },
239 {
"code" , { code } },
243 uint_fast16_t ret =
post (
"/oauth/token" , parameters, answer);
247 std::regex retoken(
"access_token\":\"([0-9a-fA-F]+)\"" );
249 std::regex_search(answer, match, retoken);
250 access_token = match[1].str();
251 _access_token = access_token;
257 std::cerr <<
"Error code: " << ret <<
'\n' ;
const uint_fast16_t post(const Mastodon::API::v1 &call, string &answer)
Make a POST request which doesn't require parameters.
Definition: post.cpp:128
-
std::map< string, std::vector< string > > parametermap
Used for passing parameters.
Definition: mastodon-cpp.hpp:188
+
std::map< string, std::vector< string > > parametermap
Used for passing parameters.
Definition: mastodon-cpp.hpp:189
diff --git a/docs/classMastodon_1_1API_1_1http-members.html b/docs/classMastodon_1_1API_1_1http-members.html
index 25fd39b..82aa146 100644
--- a/docs/classMastodon_1_1API_1_1http-members.html
+++ b/docs/classMastodon_1_1API_1_1http-members.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1API_1_1http.html b/docs/classMastodon_1_1API_1_1http.html
index 80d1ea6..29f370f 100644
--- a/docs/classMastodon_1_1API_1_1http.html
+++ b/docs/classMastodon_1_1API_1_1http.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -119,7 +119,7 @@ const void abort_stream Cancels the stream. Use only with streams.
Cancels the stream next time data comes in. Can take a few seconds. This works only with streams, because only streams have an own http object.
Since 0.12.2
- 222 _cancel_stream =
true ;
+ 230 _cancel_stream =
true ;
@@ -141,7 +141,7 @@ const void abort_stream The mutex guards the function that writes to the string you specified in get_stream() .
Returns A reference of the mutex.
Since 0.12.3
-
+
@@ -194,7 +194,7 @@ const void abort_stream
Returns Error code . If the URL has permanently changed, 13 is returned and answer is set to the new URL.
Since before 0.11.0
- 59 using namespace std::placeholders;
61 uint_fast16_t ret = 0;
62 ttdebug <<
"Path is: " << path <<
'\n' ;
67 std::list<string> headers;
69 request.setOpt<curlopts::Url>(
"https://" + _instance + path);
70 ttdebug <<
"User-Agent: " << parent.get_useragent() <<
"\n" ;
71 request.setOpt<curlopts::UserAgent>(parent.get_useragent());
76 parent.get_proxy(proxy, userpw);
79 request.setOpt<curlopts::Proxy>(proxy);
82 request.setOpt<curlopts::ProxyUserPwd>(userpw);
87 if (!_access_token.empty())
89 headers.push_back(
"Authorization: Bearer " + _access_token);
91 if (meth != http::method::GET_STREAM)
93 headers.push_back(
"Connection: close" );
95 request.setOpt<curlpp::options::Header>(
true );
98 request.setOpt<curlopts::HttpHeader>(headers);
99 request.setOpt<curlopts::FollowLocation>(
true );
100 request.setOpt<curlopts::WriteFunction>
101 (std::bind(&http::callback_write,
this , _1, _2, _3, &answer));
102 request.setOpt<curlopts::ProgressFunction>
103 (std::bind(&http::callback_progress,
this , _1, _2, _3, _4));
104 request.setOpt<curlopts::NoProgress>(0);
105 if (!formdata.empty())
107 request.setOpt<curlopts::HttpPost>(formdata);
112 case http::method::GET:
114 case http::method::PATCH:
115 request.setOpt<curlopts::CustomRequest>(
"PATCH" );
117 case http::method::POST:
118 request.setOpt<curlopts::CustomRequest>(
"POST" );
120 case http::method::PUT:
121 request.setOpt<curlopts::CustomRequest>(
"PUT" );
122 case http::method::DELETE:
123 request.setOpt<curlopts::CustomRequest>(
"DELETE" );
132 ret = curlpp::infos::ResponseCode::get(request);
133 ttdebug <<
"Response code: " << ret <<
'\n' ;
135 size_t pos = answer.find(
"\r\n\r\n" , 25);
136 _headers = answer.substr(0, pos);
138 answer = answer.substr(pos + 4);
140 if (ret == 200 || ret == 302 || ret == 307)
144 else if (ret == 301 || ret == 308)
147 answer = curlpp::infos::EffectiveUrl::get(request);
155 catch (curlpp::RuntimeError &e)
158 if ((std::strncmp(e.what(),
"Callback aborted" , 16) == 0) ||
159 (std::strncmp(e.what(),
"Failed writing body" , 19) == 0))
161 ttdebug <<
"Request was cancelled by user\n" ;
165 if (parent.exceptions())
167 std::rethrow_exception(std::current_exception());
171 ttdebug <<
"curlpp::RuntimeError: " << e.what() << std::endl;
175 catch (curlpp::LogicError &e)
177 if (parent.exceptions())
179 std::rethrow_exception(std::current_exception());
182 ttdebug <<
"curlpp::LogicError: " << e.what() << std::endl;
+ 59 using namespace std::placeholders;
61 uint_fast16_t ret = 0;
62 ttdebug <<
"Path is: " << path <<
'\n' ;
67 std::list<string> headers;
69 request.setOpt<curlopts::Url>(
"https://" + _instance + path);
70 ttdebug <<
"User-Agent: " << parent.get_useragent() <<
"\n" ;
71 request.setOpt<curlopts::UserAgent>(parent.get_useragent());
76 parent.get_proxy(proxy, userpw);
79 request.setOpt<curlopts::Proxy>(proxy);
82 request.setOpt<curlopts::ProxyUserPwd>(userpw);
87 if (!_access_token.empty())
89 headers.push_back(
"Authorization: Bearer " + _access_token);
91 if (meth != http::method::GET_STREAM)
93 headers.push_back(
"Connection: close" );
95 request.setOpt<curlpp::options::Header>(
true );
98 request.setOpt<curlopts::HttpHeader>(headers);
99 request.setOpt<curlopts::FollowLocation>(
true );
100 request.setOpt<curlopts::WriteFunction>
101 (std::bind(&http::callback_write,
this , _1, _2, _3, &answer));
102 request.setOpt<curlopts::ProgressFunction>
103 (std::bind(&http::callback_progress,
this , _1, _2, _3, _4));
104 request.setOpt<curlopts::NoProgress>(0);
105 if (!formdata.empty())
107 request.setOpt<curlopts::HttpPost>(formdata);
112 case http::method::GET:
114 case http::method::PATCH:
115 request.setOpt<curlopts::CustomRequest>(
"PATCH" );
117 case http::method::POST:
118 request.setOpt<curlopts::CustomRequest>(
"POST" );
120 case http::method::PUT:
121 request.setOpt<curlopts::CustomRequest>(
"PUT" );
122 case http::method::DELETE:
123 request.setOpt<curlopts::CustomRequest>(
"DELETE" );
132 ret = curlpp::infos::ResponseCode::get(request);
133 ttdebug <<
"Response code: " << ret <<
'\n' ;
135 size_t pos = answer.find(
"\r\n\r\n" , 25);
136 _headers = answer.substr(0, pos);
138 answer = answer.substr(pos + 4);
140 if (ret == 200 || ret == 302 || ret == 307)
144 else if (ret == 301 || ret == 308)
147 answer = curlpp::infos::EffectiveUrl::get(request);
159 catch (curlpp::RuntimeError &e)
161 const string what = e.what();
163 if ((what.compare(0, 16,
"Callback aborted" ) == 0) ||
164 (what.compare(0, 19,
"Failed writing body" ) == 0))
166 ttdebug <<
"Request was cancelled by user\n" ;
169 else if (what.compare(what.size() - 20, 20,
"Connection timed out" ) == 0)
171 ttdebug <<
"Timeout\n" ;
175 if (parent.exceptions())
177 std::rethrow_exception(std::current_exception());
181 ttdebug <<
"curlpp::RuntimeError: " << e.what() << std::endl;
185 catch (curlpp::LogicError &e)
187 if (parent.exceptions())
189 std::rethrow_exception(std::current_exception());
192 ttdebug <<
"curlpp::LogicError: " << e.what() << std::endl;
The documentation for this class was generated from the following files:
diff --git a/docs/classMastodon_1_1Easy-members.html b/docs/classMastodon_1_1Easy-members.html
index 23c43d7..1e61891 100644
--- a/docs/classMastodon_1_1Easy-members.html
+++ b/docs/classMastodon_1_1Easy-members.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -94,8 +94,8 @@ $(function() {
register_app1 (const string &instance, const string &client_name, const string &redirect_uri, const string &scopes, const string &website, string &client_id, string &client_secret, string &url) (defined in Mastodon::API )Mastodon::API
register_app2 (const string &client_id, const string &client_secret, const string &redirect_uri, const string &code, string &access_token)Mastodon::API
register_app2 (const string &instance, const string &client_id, const string &client_secret, const string &redirect_uri, const string &code, string &access_token) (defined in Mastodon::API )Mastodon::API
- send_post (const Status &status, uint_fast16_t error=0)Mastodon::Easy
- send_toot (const Status &status, uint_fast16_t error=0)Mastodon::Easy
+ send_post (const Status &status, uint_fast16_t &error)Mastodon::Easy
+ send_toot (const Status &status, uint_fast16_t &error)Mastodon::Easy
set_proxy (const string &proxy, const string &userpw="")Mastodon::API
set_useragent (const string &useragent)Mastodon::API
stream_event typedefMastodon::Easy
diff --git a/docs/classMastodon_1_1Easy.html b/docs/classMastodon_1_1Easy.html
index 10615f0..0f3b058 100644
--- a/docs/classMastodon_1_1Easy.html
+++ b/docs/classMastodon_1_1Easy.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -283,12 +283,12 @@ Public Member Functions
const Link get_link () const
Gets the links from the last answer. More...
-const Status send_post (const Status &status, uint_fast16_t error=0)
- Sends a toot. More...
-
-const Status send_toot (const Status &status, uint_fast16_t error=0)
- Alias for send_post() More...
-
+const Status send_post (const Status &status, uint_fast16_t &error)
+ Sends a toot. More...
+
+const Status send_toot (const Status &status, uint_fast16_t &error)
+ Alias for send_post() More...
+
API (const string &instance, const string &access_token)
Constructs a new API object. More...
@@ -744,8 +744,8 @@ static const string strtim
-
-◆ send_post()
+
+◆ send_post()
@@ -759,8 +759,8 @@ static const string
strtim
- uint_fast16_t
- error = 0
+ uint_fast16_t &
+ error
@@ -789,13 +789,13 @@ static const string strtim
const string language() const
Returns the language of the status.
Definition: status.cpp:140
Class to hold statuses.
Definition: status.hpp:57
const string content() const
Returns content of status.
Definition: status.cpp:82
-std::map< string, std::vector< string > > parametermap
Used for passing parameters.
Definition: mastodon-cpp.hpp:188
+std::map< string, std::vector< string > > parametermap
Used for passing parameters.
Definition: mastodon-cpp.hpp:189
const string spoiler_text() const
Returns the spoiler text.
Definition: status.cpp:239
-
-◆ send_toot()
+
+◆ send_toot()
@@ -809,8 +809,8 @@ static const string
strtim
- uint_fast16_t
- error = 0
+ uint_fast16_t &
+ error
@@ -820,9 +820,9 @@ static const string strtim
-
Alias for send_post()
+
Alias for send_post()
Since 0.17.0
-
const Status send_post(const Status &status, uint_fast16_t error=0)
Sends a toot.
Definition: simple_calls.cpp:29
+
const Status send_post(const Status &status, uint_fast16_t &error)
Sends a toot.
Definition: simple_calls.cpp:29
diff --git a/docs/classMastodon_1_1Easy_1_1Account-members.html b/docs/classMastodon_1_1Easy_1_1Account-members.html
index 46c0a7e..c3b2bc9 100644
--- a/docs/classMastodon_1_1Easy_1_1Account-members.html
+++ b/docs/classMastodon_1_1Easy_1_1Account-members.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -54,37 +54,45 @@ $(function() {
Account ()Mastodon::Easy::Account
acct () constMastodon::Easy::Account
avatar () constMastodon::Easy::Account
- avatar_static () constMastodon::Easy::Account
- bot () constMastodon::Easy::Account
- check_valid (const std::vector< string > &attributes) constMastodon::Easy::Entity protected
- created_at () constMastodon::Easy::Account
- display_name () constMastodon::Easy::Account
+ avatar (const string &avatar)Mastodon::Easy::Account
+ avatar_static () constMastodon::Easy::Account
+ bot () constMastodon::Easy::Account
+ check_valid (const std::vector< string > &attributes) constMastodon::Easy::Entity protected
+ created_at () constMastodon::Easy::Account
+ display_name () constMastodon::Easy::Account
+ display_name (const string &display_name)Mastodon::Easy::Account
Entity (const string &json)Mastodon::Easy::Entity explicit
Entity ()Mastodon::Easy::Entity
error () constMastodon::Easy::Entity
fields () constMastodon::Easy::Account
- fields_pair typedefMastodon::Easy::Account
- followers_count () constMastodon::Easy::Account
- following_count () constMastodon::Easy::Account
- from_string (const string &json)Mastodon::Easy::Entity
- get (const string &key) constMastodon::Easy::Entity protected
- get_bool (const string &key) constMastodon::Easy::Entity protected
- get_double (const string &key) constMastodon::Easy::Entity protected
- get_string (const string &key) constMastodon::Easy::Entity protected
- get_time_point (const string &key) constMastodon::Easy::Entity protected
- get_uint64 (const string &key) constMastodon::Easy::Entity protected
- get_vector (const string &key) constMastodon::Easy::Entity protected
- has_moved () constMastodon::Easy::Account
- header () constMastodon::Easy::Account
+ fields (std::vector< fields_pair > &fields)Mastodon::Easy::Account
+ fields_pair typedefMastodon::Easy::Account
+ followers_count () constMastodon::Easy::Account
+ following_count () constMastodon::Easy::Account
+ from_string (const string &json)Mastodon::Easy::Entity
+ get (const string &key) constMastodon::Easy::Entity protected
+ get_bool (const string &key) constMastodon::Easy::Entity protected
+ get_double (const string &key) constMastodon::Easy::Entity protected
+ get_string (const string &key) constMastodon::Easy::Entity protected
+ get_time_point (const string &key) constMastodon::Easy::Entity protected
+ get_uint64 (const string &key) constMastodon::Easy::Entity protected
+ get_vector (const string &key) constMastodon::Easy::Entity protected
+ has_moved () constMastodon::Easy::Account
+ header () constMastodon::Easy::Account
+ header (const string &header)Mastodon::Easy::Account
header_static () constMastodon::Easy::Account
id () constMastodon::Easy::Account
locked () constMastodon::Easy::Account
- moved () constMastodon::Easy::Account
- note () constMastodon::Easy::Account
+ locked (const bool &locked)Mastodon::Easy::Account
+ moved () constMastodon::Easy::Account
+ note () constMastodon::Easy::Account
+ note (const string ¬e)Mastodon::Easy::Account
note_plain () constMastodon::Easy::Account
privacy () constMastodon::Easy::Account
sensitive () constMastodon::Easy::Account
set (const string &key, const Json::Value &value)Mastodon::Easy::Entity protected
+ source () const (defined in Mastodon::Easy::Account )Mastodon::Easy::Account
+ source (const Source &source) (defined in Mastodon::Easy::Account )Mastodon::Easy::Account
statuses_count () constMastodon::Easy::Account
stouint64 (const string &str) const (defined in Mastodon::Easy::Entity )Mastodon::Easy::Entity protected
to_object () constMastodon::Easy::Entity
diff --git a/docs/classMastodon_1_1Easy_1_1Account.html b/docs/classMastodon_1_1Easy_1_1Account.html
index 1536a58..32c81c8 100644
--- a/docs/classMastodon_1_1Easy_1_1Account.html
+++ b/docs/classMastodon_1_1Easy_1_1Account.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -44,6 +44,7 @@ $(function() {
using fields_pair = std::pair< const string, const string >
@@ -89,6 +96,9 @@ Public Member Functions
const string avatar () const
Returns URL of avatar. More...
+Account avatar (const string &avatar)
+ Sets avatar. More...
+
const string avatar_static () const
Returns URL of static avatar. More...
@@ -101,9 +111,15 @@ Public Member Functions
const string display_name () const
Returns display name. More...
+Account display_name (const string &display_name)
+ Sets display name. More...
+
const std::vector< fields_pair > fields () const
Returns metadata fields. More...
+Account fields (std::vector< fields_pair > &fields)
+ Sets metadata fields. More...
+
const uint_fast64_t followers_count () const
Returns number of followers. More...
@@ -113,6 +129,9 @@ Public Member Functions
const string header () const
Returns URL of header image. More...
+Account header (const string &header)
+ Sets header image. More...
+
const string header_static () const
Returns URL of static header image. More...
@@ -122,6 +141,9 @@ Public Member Functions
const bool locked () const
Returns true if the account is locked. More...
+Account locked (const bool &locked)
+ Sets locked state. More...
+
const bool has_moved () const
Returns true if the account has been moved. More...
@@ -131,6 +153,9 @@ Public Member Functions
const string note () const
Returns note. More...
+Account note (const string ¬e)
+ Sets note. More...
+
const string note_plain () const
Returns plaintext version of note. More...
@@ -140,6 +165,12 @@ Public Member Functions
const bool sensitive () const
Returns if media is marked as sensitive by default. More...
+
+const Source source () const
+
+
+Account source (const Source &source)
+
const uint_fast64_t statuses_count () const
Returns number of statuses. More...
@@ -306,7 +337,7 @@ const std::uint_fast64_t s
-◆ avatar()
+◆ avatar() [1/2]
@@ -326,6 +357,29 @@ const std::uint_fast64_t
s
+
+◆ avatar() [2/2]
+
+
+
+
+
+ Account Account::avatar
+ (
+ const string &
+ avatar )
+
+
+
+
+
+
Sets avatar.
+
Filename or base64-encoded
+
Since 0.18.5
+
68 set (
"avatar" , Json::Value(
avatar ));
const string avatar() const
Returns URL of avatar.
Definition: account.cpp:61
+
+
+
◆ avatar_static()
@@ -343,7 +397,7 @@ const std::uint_fast64_t s
Returns URL of static avatar.
Since before 0.11.0
-const string get_string(const string &key) const
Returns the value of key as std::string.
Definition: entity.cpp:135
+
const string get_string(const string &key) const
Returns the value of key as std::string.
Definition: entity.cpp:135
@@ -364,7 +418,7 @@ const std::uint_fast64_t s
Returns true if the account performs automated actions.
Since 0.16.0
-const bool get_bool(const string &key) const
Returns the value of key as bool.
Definition: entity.cpp:177
+
const bool get_bool(const string &key) const
Returns the value of key as bool.
Definition: entity.cpp:177
@@ -385,12 +439,12 @@ const std::uint_fast64_t s
Returns time of creation.
Since before 0.11.0
-const system_clock::time_point get_time_point(const string &key) const
Returns the value of key as time_point.
Definition: entity.cpp:192
+
const system_clock::time_point get_time_point(const string &key) const
Returns the value of key as time_point.
Definition: entity.cpp:192
-◆ display_name()
+◆ display_name() [1/2]
@@ -406,12 +460,34 @@ const std::uint_fast64_t
s
Returns display name.
Since before 0.11.0
-const string get_string(const string &key) const
Returns the value of key as std::string.
Definition: entity.cpp:135
+
const string get_string(const string &key) const
Returns the value of key as std::string.
Definition: entity.cpp:135
+
+
+
+
+◆ display_name() [2/2]
+
+
+
+
+
+ Account Account::display_name
+ (
+ const string &
+ display_name )
+
+
+
+
+
+
Sets display name.
+
Since 0.18.5
+
const string display_name() const
Returns display name.
Definition: account.cpp:87
-◆ fields()
+◆ fields() [1/2]
@@ -427,8 +503,29 @@ const std::uint_fast64_t
s
Returns metadata fields.
Since 0.16.1
- 88 const Json::Value &node =
get (
"fields" );
92 std::vector<Account::fields_pair> vec;
93 for (
const Json::Value &value : node)
96 value[
"value" ].asString()));
std::pair< const string, const string > fields_pair
Describes a field. Format: name, value.
Definition: account.hpp:54
+
100 const Json::Value &node =
get (
"fields" );
104 std::vector<Account::fields_pair> vec;
105 for (
const Json::Value &value : node)
108 value[
"value" ].asString()));
std::pair< const string, const string > fields_pair
Describes a field. Format: name, value.
Definition: account.hpp:54
+
+
+
+◆ fields() [2/2]
+
+
+
+
+
+ Account Mastodon::Easy::Account::fields
+ (
+ std::vector< fields_pair > &
+ fields )
+
+
+
+
+
+
Sets metadata fields.
+
Since 0.18.5
+
@@ -448,7 +545,7 @@ const std::uint_fast64_t s
Returns number of followers.
Since before 0.11.0
-const uint_fast64_t get_uint64(const string &key) const
Returns the value of key as std::uint_fast64_t.
Definition: entity.cpp:149
+
const uint_fast64_t get_uint64(const string &key) const
Returns the value of key as std::uint_fast64_t.
Definition: entity.cpp:149
@@ -469,7 +566,7 @@ const std::uint_fast64_t s
Returns number of people this account follows.
Since before 0.11.0
-const uint_fast64_t get_uint64(const string &key) const
Returns the value of key as std::uint_fast64_t.
Definition: entity.cpp:149
+
const uint_fast64_t get_uint64(const string &key) const
Returns the value of key as std::uint_fast64_t.
Definition: entity.cpp:149
@@ -490,11 +587,11 @@ const std::uint_fast64_t s
Returns true if the account has been moved.
Since before 0.11.0
- 136 if (
get (
"moved" ).isObject())
+ 175 if (
get (
"moved" ).isObject())
-◆ header()
+◆ header() [1/2]
@@ -510,7 +607,30 @@ const std::uint_fast64_t
s
Returns URL of header image.
Since before 0.11.0
-const string get_string(const string &key) const
Returns the value of key as std::string.
Definition: entity.cpp:135
+
const string get_string(const string &key) const
Returns the value of key as std::string.
Definition: entity.cpp:135
+
+
+
+
+◆ header() [2/2]
+
+
+
+
+
+ Account Account::header
+ (
+ const string &
+ header )
+
+
+
+
+
+
Sets header image.
+
Filename or base64-encoded.
+
Since 0.18.5
+
148 set (
"header" , Json::Value(
header ));
const string header() const
Returns URL of header image.
Definition: account.cpp:141
@@ -531,7 +651,7 @@ const std::uint_fast64_t s
Returns URL of static header image.
Since before 0.11.0
-const string get_string(const string &key) const
Returns the value of key as std::string.
Definition: entity.cpp:135
+
const string get_string(const string &key) const
Returns the value of key as std::string.
Definition: entity.cpp:135
@@ -552,12 +672,12 @@ const std::uint_fast64_t s
Returns account-ID.
Since before 0.11.0
-const string get_string(const string &key) const
Returns the value of key as std::string.
Definition: entity.cpp:135
+
const string get_string(const string &key) const
Returns the value of key as std::string.
Definition: entity.cpp:135
-◆ locked()
+◆ locked() [1/2]
@@ -573,7 +693,29 @@ const std::uint_fast64_t
s
Returns true if the account is locked.
Since before 0.11.0
-const bool get_bool(const string &key) const
Returns the value of key as bool.
Definition: entity.cpp:177
+
const bool get_bool(const string &key) const
Returns the value of key as bool.
Definition: entity.cpp:177
+
+
+
+
+◆ locked() [2/2]
+
+
+
+
+
+ Account Account::locked
+ (
+ const bool &
+ locked )
+
+
+
+
+
+
Sets locked state.
+
Since 0.18.5
+
169 set (
"locked" , Json::Value(
locked ));
const bool locked() const
Returns true if the account is locked.
Definition: account.cpp:162
@@ -594,13 +736,13 @@ const std::uint_fast64_t s
If the owner decided to switch accounts, new account is in this attribute.
Since before 0.11.0
- 149 return Account (
get (
"moved" ).toStyledString());
const bool has_moved() const
Returns true if the account has been moved.
Definition: account.cpp:134
+
188 return Account (
get (
"moved" ).toStyledString());
const bool has_moved() const
Returns true if the account has been moved.
Definition: account.cpp:173
Account()
Constructs an empty Account object.
Definition: account.cpp:28
-◆ note()
+◆ note() [1/2]
@@ -616,7 +758,29 @@ const std::uint_fast64_t
s
Returns note.
Since before 0.11.0
-const string get_string(const string &key) const
Returns the value of key as std::string.
Definition: entity.cpp:135
+
const string get_string(const string &key) const
Returns the value of key as std::string.
Definition: entity.cpp:135
+
+
+
+
+◆ note() [2/2]
+
+
+
+
+
+ Account Account::note
+ (
+ const string &
+ note )
+
+
+
+
+
+
Sets note.
+
Since 0.18.5
+
201 set (
"note" , Json::Value(
note ));
const string note() const
Returns note.
Definition: account.cpp:194
@@ -637,7 +801,7 @@ const std::uint_fast64_t s
Returns plaintext version of note.
Since before 0.11.0
-const string get_string(const string &key) const
Returns the value of key as std::string.
Definition: entity.cpp:135
+
const string get_string(const string &key) const
Returns the value of key as std::string.
Definition: entity.cpp:135
@@ -658,7 +822,7 @@ const std::uint_fast64_t s
Returns default privacy of new toots.
Since before 0.11.0
- 167 const string strprivacy =
get_string (
"source.privacy" );
168 if (strprivacy.compare(
"public" ) == 0)
169 return visibility_type::Public;
170 else if (strprivacy.compare(
"unlisted" ) == 0)
171 return visibility_type::Unlisted;
172 else if (strprivacy.compare(
"private" ) == 0)
173 return visibility_type::Private;
174 else if (strprivacy.compare(
"direct" ) == 0)
175 return visibility_type::Direct;
177 ttdebug <<
"Could not get data: source.privacy\n" ;
178 return visibility_type::Undefined;
const string get_string(const string &key) const
Returns the value of key as std::string.
Definition: entity.cpp:135
+
212 const string strprivacy =
get_string (
"source.privacy" );
213 if (strprivacy.compare(
"public" ) == 0)
214 return visibility_type::Public;
215 else if (strprivacy.compare(
"unlisted" ) == 0)
216 return visibility_type::Unlisted;
217 else if (strprivacy.compare(
"private" ) == 0)
218 return visibility_type::Private;
219 else if (strprivacy.compare(
"direct" ) == 0)
220 return visibility_type::Direct;
222 ttdebug <<
"Could not get data: source.privacy\n" ;
223 return visibility_type::Undefined;
const string get_string(const string &key) const
Returns the value of key as std::string.
Definition: entity.cpp:135
@@ -679,7 +843,7 @@ const std::uint_fast64_t s
Returns if media is marked as sensitive by default.
Since before 0.11.0
- 183 return get_bool (
"source.sensitive" );
const bool get_bool(const string &key) const
Returns the value of key as bool.
Definition: entity.cpp:177
+
228 return get_bool (
"source.sensitive" );
const bool get_bool(const string &key) const
Returns the value of key as bool.
Definition: entity.cpp:177
@@ -700,7 +864,7 @@ const std::uint_fast64_t s
Returns number of statuses.
Since before 0.11.0
-const uint_fast64_t get_uint64(const string &key) const
Returns the value of key as std::uint_fast64_t.
Definition: entity.cpp:149
+
const uint_fast64_t get_uint64(const string &key) const
Returns the value of key as std::uint_fast64_t.
Definition: entity.cpp:149
@@ -721,7 +885,7 @@ const std::uint_fast64_t s
Returns URL of the profile.
Since before 0.11.0
-const string get_string(const string &key) const
Returns the value of key as std::string.
Definition: entity.cpp:135
+
const string get_string(const string &key) const
Returns the value of key as std::string.
Definition: entity.cpp:135
@@ -742,7 +906,7 @@ const std::uint_fast64_t s
Returns username (without )
Since before 0.11.0
-const string get_string(const string &key) const
Returns the value of key as std::string.
Definition: entity.cpp:135
+
const string get_string(const string &key) const
Returns the value of key as std::string.
Definition: entity.cpp:135
diff --git a/docs/classMastodon_1_1Easy_1_1Account_1_1Source-members.html b/docs/classMastodon_1_1Easy_1_1Account_1_1Source-members.html
new file mode 100644
index 0000000..a68dea4
--- /dev/null
+++ b/docs/classMastodon_1_1Easy_1_1Account_1_1Source-members.html
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+
+mastodon-cpp: Member List
+
+
+
+
+
+
+
+
+
+
+
+
+ mastodon-cpp
+ 0.18.8
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This is the complete list of members for Mastodon::Easy::Account::Source , including all inherited members.
+
+
+
+
+
diff --git a/docs/classMastodon_1_1Easy_1_1Account_1_1Source.html b/docs/classMastodon_1_1Easy_1_1Account_1_1Source.html
new file mode 100644
index 0000000..a33145f
--- /dev/null
+++ b/docs/classMastodon_1_1Easy_1_1Account_1_1Source.html
@@ -0,0 +1,432 @@
+
+
+
+
+
+
+
+mastodon-cpp: Mastodon::Easy::Account::Source Class Reference
+
+
+
+
+
+
+
+
+
+
+
+
+ mastodon-cpp
+ 0.18.8
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Class to hold source attribute.
+ More...
+
+
#include <account.hpp >
+
+
+
+
+
+
+
+
+
+
+
+const Json::Value get (const string &key) const
+ Returns the value of key as Json::Value. More...
+
+const string get_string (const string &key) const
+ Returns the value of key as std::string. More...
+
+const uint_fast64_t get_uint64 (const string &key) const
+ Returns the value of key as std::uint_fast64_t. More...
+
+const double get_double (const string &key) const
+ Returns the value of key as double. More...
+
+const bool get_bool (const string &key) const
+ Returns the value of key as bool. More...
+
+const system_clock::time_point get_time_point (const string &key) const
+ Returns the value of key as time_point. More...
+
+const std::vector< string > get_vector (const string &key) const
+ Returns the value of key as vector. More...
+
+const void set (const string &key, const Json::Value &value)
+ Sets the value of key. More...
+
+
+const std::uint_fast64_t stouint64 (const string &str) const
+
+const bool check_valid (const std::vector< string > &attributes) const
+ Checks if an Entity is valid. More...
+
+
+
+
Class to hold source attribute.
+
Since 0.18.5
+
+
+
◆ Source() [1/2]
+
+
+
+
+
Constructs an Account::Source object from a JSON string.
+
Parameters
+
+
+
+
Since 0.18.5
+
Entity()
Constructs an empty Entity object.
Definition: entity.cpp:65
+
+
+
+
+
◆ Source() [2/2]
+
+
+
+
+
Constructs an empty Account::Source object.
+
Since 0.18.5
+
Entity()
Constructs an empty Entity object.
Definition: entity.cpp:65
+
+
+
+
+
+
◆ fields() [1/2]
+
+
+
+
+
Returns metadata fields.
+
Since 0.18.5
+
246 const Json::Value &node =
get (
"fields" );
250 std::vector<Account::fields_pair> vec;
251 for (
const Json::Value &value : node)
254 value[
"value" ].asString()));
std::pair< const string, const string > fields_pair
Describes a field. Format: name, value.
Definition: account.hpp:54
+
+
+
+
+
◆ fields() [2/2]
+
+
+
+
+
+ Source Mastodon::Easy::Account::Source::fields
+ (
+ std::vector< fields_pair > &
+ fields )
+
+
+
+
+
+
Sets metadata fields.
+
Since 0.18.5
+
+
+
+
+
◆ note() [1/2]
+
+
+
+
+
+ const string Account::Source::note
+ (
+ )
+ const
+
+
+
+
+
Returns note in plain text.
+
Since 0.18.5
+
const string get_string(const string &key) const
Returns the value of key as std::string.
Definition: entity.cpp:135
+
+
+
+
+
◆ note() [2/2]
+
+
+
+
+
+ Account::Source Account::Source::note
+ (
+ const string &
+ note )
+
+
+
+
+
+
Sets note.
+
Since 0.18.5
+
285 set (
"note" , Json::Value(
note ));
const string note() const
Returns note in plain text.
Definition: account.cpp:278
+
+
+
+
+
◆ privacy() [1/2]
+
+
+
+
+
Returns default privacy of new toots.
+
Since 0.18.5
+
291 const string strprivacy =
get_string (
"privacy" );
292 if (strprivacy.compare(
"public" ) == 0)
293 return visibility_type::Public;
294 else if (strprivacy.compare(
"unlisted" ) == 0)
295 return visibility_type::Unlisted;
296 else if (strprivacy.compare(
"private" ) == 0)
297 return visibility_type::Private;
298 else if (strprivacy.compare(
"direct" ) == 0)
299 return visibility_type::Direct;
301 ttdebug <<
"Could not get data: source.privacy\n" ;
302 return visibility_type::Undefined;
const string get_string(const string &key) const
Returns the value of key as std::string.
Definition: entity.cpp:135
+
+
+
+
+
◆ privacy() [2/2]
+
+
+
+
+
Sets default privacy of new toots.
+
Since 0.18.5
+
307 string strprivacy =
"" ;
310 case visibility_type::Public:
312 strprivacy =
"public" ;
315 case visibility_type::Unlisted:
317 strprivacy =
"unlisted" ;
320 case visibility_type::Private:
322 strprivacy =
"private" ;
325 case visibility_type::Direct:
327 strprivacy =
"direct" ;
332 strprivacy =
"undefined" ;
336 set (
"privacy" , Json::Value(strprivacy));
const visibility_type privacy() const
Returns default privacy of new toots.
Definition: account.cpp:289
+
+
+
+
+
◆ sensitive() [1/2]
+
+
+
+
+
+ const bool Account::Source::sensitive
+ (
+ )
+ const
+
+
+
+
+
Returns if media is marked as sensitive by default.
+
Since 0.18.5
+
const bool get_bool(const string &key) const
Returns the value of key as bool.
Definition: entity.cpp:177
+
+
+
+
+
◆ sensitive() [2/2]
+
+
+
+
+
+ Account::Source Account::Source::sensitive
+ (
+ const bool &
+ sensitive )
+
+
+
+
+
+
Sets if media is marked as sensitive by default.
+
Since 0.18.5
+
const bool sensitive() const
Returns if media is marked as sensitive by default.
Definition: account.cpp:340
+
+
+
+
+
◆ valid()
+
+
+
+
+
+
+
+
+ const bool Account::Source::valid
+ (
+ )
+ const
+
+
+
+
+virtual
+
+
+
+
+
The documentation for this class was generated from the following files:
+src/easy/entities/account.hpp
+src/easy/entities/account.cpp
+
+
+
+
+
+
diff --git a/docs/classMastodon_1_1Easy_1_1Account_1_1Source.png b/docs/classMastodon_1_1Easy_1_1Account_1_1Source.png
new file mode 100644
index 0000000..be13d1b
Binary files /dev/null and b/docs/classMastodon_1_1Easy_1_1Account_1_1Source.png differ
diff --git a/docs/classMastodon_1_1Easy_1_1Application-members.html b/docs/classMastodon_1_1Easy_1_1Application-members.html
index bba3dfc..7bb063f 100644
--- a/docs/classMastodon_1_1Easy_1_1Application-members.html
+++ b/docs/classMastodon_1_1Easy_1_1Application-members.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Application.html b/docs/classMastodon_1_1Easy_1_1Application.html
index 548f01e..855d1f5 100644
--- a/docs/classMastodon_1_1Easy_1_1Application.html
+++ b/docs/classMastodon_1_1Easy_1_1Application.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Attachment-members.html b/docs/classMastodon_1_1Easy_1_1Attachment-members.html
index 3083f67..53bab31 100644
--- a/docs/classMastodon_1_1Easy_1_1Attachment-members.html
+++ b/docs/classMastodon_1_1Easy_1_1Attachment-members.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Attachment.html b/docs/classMastodon_1_1Easy_1_1Attachment.html
index 7d5166e..b818a8d 100644
--- a/docs/classMastodon_1_1Easy_1_1Attachment.html
+++ b/docs/classMastodon_1_1Easy_1_1Attachment.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Card-members.html b/docs/classMastodon_1_1Easy_1_1Card-members.html
index 34245f6..ff5e855 100644
--- a/docs/classMastodon_1_1Easy_1_1Card-members.html
+++ b/docs/classMastodon_1_1Easy_1_1Card-members.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Card.html b/docs/classMastodon_1_1Easy_1_1Card.html
index c706a0b..3d299aa 100644
--- a/docs/classMastodon_1_1Easy_1_1Card.html
+++ b/docs/classMastodon_1_1Easy_1_1Card.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Context-members.html b/docs/classMastodon_1_1Easy_1_1Context-members.html
index 4d65881..decb5fa 100644
--- a/docs/classMastodon_1_1Easy_1_1Context-members.html
+++ b/docs/classMastodon_1_1Easy_1_1Context-members.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Context.html b/docs/classMastodon_1_1Easy_1_1Context.html
index c7600c6..166c341 100644
--- a/docs/classMastodon_1_1Easy_1_1Context.html
+++ b/docs/classMastodon_1_1Easy_1_1Context.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Emoji-members.html b/docs/classMastodon_1_1Easy_1_1Emoji-members.html
index 88eb2c3..337c9ba 100644
--- a/docs/classMastodon_1_1Easy_1_1Emoji-members.html
+++ b/docs/classMastodon_1_1Easy_1_1Emoji-members.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Emoji.html b/docs/classMastodon_1_1Easy_1_1Emoji.html
index d36d950..34c9ba5 100644
--- a/docs/classMastodon_1_1Easy_1_1Emoji.html
+++ b/docs/classMastodon_1_1Easy_1_1Emoji.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Entity-members.html b/docs/classMastodon_1_1Easy_1_1Entity-members.html
index 7be2a66..fe26e65 100644
--- a/docs/classMastodon_1_1Easy_1_1Entity-members.html
+++ b/docs/classMastodon_1_1Easy_1_1Entity-members.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Entity.html b/docs/classMastodon_1_1Easy_1_1Entity.html
index 9dd344f..7dfaee4 100644
--- a/docs/classMastodon_1_1Easy_1_1Entity.html
+++ b/docs/classMastodon_1_1Easy_1_1Entity.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -63,22 +63,23 @@ Inheritance diagram for Mastodon::Easy::Entity:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -576,7 +577,7 @@ const std::uint_fast64_t s
Returns true if the Entity holds valid data.
Since before 0.11.0 (virtual since 0.18.2)
-Implemented in Mastodon::Easy::Tag , Mastodon::Easy::Status , Mastodon::Easy::Account , Mastodon::Easy::Tag::History , Mastodon::Easy::Notification , Mastodon::Easy::Results , Mastodon::Easy::Attachment , Mastodon::Easy::Context , Mastodon::Easy::Instance , Mastodon::Easy::List , Mastodon::Easy::Mention , Mastodon::Easy::PushSubscription , Mastodon::Easy::Card , Mastodon::Easy::Relationship , Mastodon::Easy::Report , Mastodon::Easy::Application , and Mastodon::Easy::Emoji .
+Implemented in Mastodon::Easy::Account::Source , Mastodon::Easy::Tag , Mastodon::Easy::Status , Mastodon::Easy::Account , Mastodon::Easy::Tag::History , Mastodon::Easy::Notification , Mastodon::Easy::Results , Mastodon::Easy::Attachment , Mastodon::Easy::Context , Mastodon::Easy::Instance , Mastodon::Easy::List , Mastodon::Easy::Mention , Mastodon::Easy::PushSubscription , Mastodon::Easy::Card , Mastodon::Easy::Relationship , Mastodon::Easy::Report , Mastodon::Easy::Application , and Mastodon::Easy::Emoji .
diff --git a/docs/classMastodon_1_1Easy_1_1Entity.png b/docs/classMastodon_1_1Easy_1_1Entity.png
index 368683f..4535dd7 100644
Binary files a/docs/classMastodon_1_1Easy_1_1Entity.png and b/docs/classMastodon_1_1Easy_1_1Entity.png differ
diff --git a/docs/classMastodon_1_1Easy_1_1Instance-members.html b/docs/classMastodon_1_1Easy_1_1Instance-members.html
index aeb6ac5..fde85c8 100644
--- a/docs/classMastodon_1_1Easy_1_1Instance-members.html
+++ b/docs/classMastodon_1_1Easy_1_1Instance-members.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Instance.html b/docs/classMastodon_1_1Easy_1_1Instance.html
index 58b72ab..7f77efa 100644
--- a/docs/classMastodon_1_1Easy_1_1Instance.html
+++ b/docs/classMastodon_1_1Easy_1_1Instance.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Link-members.html b/docs/classMastodon_1_1Easy_1_1Link-members.html
index 68928dd..8f8a62b 100644
--- a/docs/classMastodon_1_1Easy_1_1Link-members.html
+++ b/docs/classMastodon_1_1Easy_1_1Link-members.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Link.html b/docs/classMastodon_1_1Easy_1_1Link.html
index 78c70e4..15ddf5a 100644
--- a/docs/classMastodon_1_1Easy_1_1Link.html
+++ b/docs/classMastodon_1_1Easy_1_1Link.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1List-members.html b/docs/classMastodon_1_1Easy_1_1List-members.html
index eaae3de..a68ad26 100644
--- a/docs/classMastodon_1_1Easy_1_1List-members.html
+++ b/docs/classMastodon_1_1Easy_1_1List-members.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1List.html b/docs/classMastodon_1_1Easy_1_1List.html
index e876ee0..90b1116 100644
--- a/docs/classMastodon_1_1Easy_1_1List.html
+++ b/docs/classMastodon_1_1Easy_1_1List.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Mention-members.html b/docs/classMastodon_1_1Easy_1_1Mention-members.html
index 7d3411b..4179572 100644
--- a/docs/classMastodon_1_1Easy_1_1Mention-members.html
+++ b/docs/classMastodon_1_1Easy_1_1Mention-members.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Mention.html b/docs/classMastodon_1_1Easy_1_1Mention.html
index 62b754d..fea80b2 100644
--- a/docs/classMastodon_1_1Easy_1_1Mention.html
+++ b/docs/classMastodon_1_1Easy_1_1Mention.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Notification-members.html b/docs/classMastodon_1_1Easy_1_1Notification-members.html
index 5a881f9..46eb442 100644
--- a/docs/classMastodon_1_1Easy_1_1Notification-members.html
+++ b/docs/classMastodon_1_1Easy_1_1Notification-members.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Notification.html b/docs/classMastodon_1_1Easy_1_1Notification.html
index af233cc..981e52d 100644
--- a/docs/classMastodon_1_1Easy_1_1Notification.html
+++ b/docs/classMastodon_1_1Easy_1_1Notification.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1PushSubscription-members.html b/docs/classMastodon_1_1Easy_1_1PushSubscription-members.html
index 3aec756..60263d6 100644
--- a/docs/classMastodon_1_1Easy_1_1PushSubscription-members.html
+++ b/docs/classMastodon_1_1Easy_1_1PushSubscription-members.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1PushSubscription.html b/docs/classMastodon_1_1Easy_1_1PushSubscription.html
index 97ae99f..1af2bb7 100644
--- a/docs/classMastodon_1_1Easy_1_1PushSubscription.html
+++ b/docs/classMastodon_1_1Easy_1_1PushSubscription.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Relationship-members.html b/docs/classMastodon_1_1Easy_1_1Relationship-members.html
index d09b886..ae47a4e 100644
--- a/docs/classMastodon_1_1Easy_1_1Relationship-members.html
+++ b/docs/classMastodon_1_1Easy_1_1Relationship-members.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Relationship.html b/docs/classMastodon_1_1Easy_1_1Relationship.html
index 976a836..d7a747c 100644
--- a/docs/classMastodon_1_1Easy_1_1Relationship.html
+++ b/docs/classMastodon_1_1Easy_1_1Relationship.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Report-members.html b/docs/classMastodon_1_1Easy_1_1Report-members.html
index ec8b16a..b2030e7 100644
--- a/docs/classMastodon_1_1Easy_1_1Report-members.html
+++ b/docs/classMastodon_1_1Easy_1_1Report-members.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Report.html b/docs/classMastodon_1_1Easy_1_1Report.html
index 0f54ac7..88000b0 100644
--- a/docs/classMastodon_1_1Easy_1_1Report.html
+++ b/docs/classMastodon_1_1Easy_1_1Report.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Results-members.html b/docs/classMastodon_1_1Easy_1_1Results-members.html
index 0c40ed6..c78204a 100644
--- a/docs/classMastodon_1_1Easy_1_1Results-members.html
+++ b/docs/classMastodon_1_1Easy_1_1Results-members.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Results.html b/docs/classMastodon_1_1Easy_1_1Results.html
index e59d0bf..cd2bcfb 100644
--- a/docs/classMastodon_1_1Easy_1_1Results.html
+++ b/docs/classMastodon_1_1Easy_1_1Results.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Status-members.html b/docs/classMastodon_1_1Easy_1_1Status-members.html
index 81d804a..2d32dad 100644
--- a/docs/classMastodon_1_1Easy_1_1Status-members.html
+++ b/docs/classMastodon_1_1Easy_1_1Status-members.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Status.html b/docs/classMastodon_1_1Easy_1_1Status.html
index bedbd63..e7779b5 100644
--- a/docs/classMastodon_1_1Easy_1_1Status.html
+++ b/docs/classMastodon_1_1Easy_1_1Status.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Tag-members.html b/docs/classMastodon_1_1Easy_1_1Tag-members.html
index c4d6284..bb3a3dd 100644
--- a/docs/classMastodon_1_1Easy_1_1Tag-members.html
+++ b/docs/classMastodon_1_1Easy_1_1Tag-members.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Tag.html b/docs/classMastodon_1_1Easy_1_1Tag.html
index f16b630..c53d83c 100644
--- a/docs/classMastodon_1_1Easy_1_1Tag.html
+++ b/docs/classMastodon_1_1Easy_1_1Tag.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Tag_1_1History-members.html b/docs/classMastodon_1_1Easy_1_1Tag_1_1History-members.html
index 0cafb13..c1dacd0 100644
--- a/docs/classMastodon_1_1Easy_1_1Tag_1_1History-members.html
+++ b/docs/classMastodon_1_1Easy_1_1Tag_1_1History-members.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classMastodon_1_1Easy_1_1Tag_1_1History.html b/docs/classMastodon_1_1Easy_1_1Tag_1_1History.html
index 6754711..d0e69db 100644
--- a/docs/classMastodon_1_1Easy_1_1Tag_1_1History.html
+++ b/docs/classMastodon_1_1Easy_1_1Tag_1_1History.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/classes.html b/docs/classes.html
index 3704149..f7c153f 100644
--- a/docs/classes.html
+++ b/docs/classes.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -49,12 +49,12 @@ $(function() {
-
+Easy::Status (Mastodon)
+
-
-Easy::Account (Mastodon) Easy (Mastodon) Easy::Link (Mastodon) Easy::PushSubscription (Mastodon) Easy::Tag (Mastodon)
+Easy::Account (Mastodon) Easy (Mastodon) Easy::Link (Mastodon) Easy::PushSubscription (Mastodon)
API (Mastodon) Easy::Emoji (Mastodon) Easy::List (Mastodon)
-
+Easy::Tag (Mastodon)
Easy::Application (Mastodon) Easy::Entity (Mastodon)
Easy::Attachment (Mastodon)
@@ -67,7 +67,7 @@ $(function() {
Easy::Context (Mastodon)
Easy::Notification (Mastodon)
-Easy::Status (Mastodon)
+Easy::Account::Source (Mastodon)
Easy::Instance (Mastodon)
diff --git a/docs/context_8hpp_source.html b/docs/context_8hpp_source.html
index 899e075..faa1bd2 100644
--- a/docs/context_8hpp_source.html
+++ b/docs/context_8hpp_source.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/docs/dir_68267d1309a1af8e8297ef4c3efbcdba.html
index a3812bd..a0c14c2 100644
--- a/docs/dir_68267d1309a1af8e8297ef4c3efbcdba.html
+++ b/docs/dir_68267d1309a1af8e8297ef4c3efbcdba.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/dir_9d328871126a6a5820f3cd5c0c41741e.html b/docs/dir_9d328871126a6a5820f3cd5c0c41741e.html
index f2fe85a..5a042ab 100644
--- a/docs/dir_9d328871126a6a5820f3cd5c0c41741e.html
+++ b/docs/dir_9d328871126a6a5820f3cd5c0c41741e.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/dir_da61e3e9a357748887e3ca8d7c5a0c16.html b/docs/dir_da61e3e9a357748887e3ca8d7c5a0c16.html
index dd88d6f..c27fe13 100644
--- a/docs/dir_da61e3e9a357748887e3ca8d7c5a0c16.html
+++ b/docs/dir_da61e3e9a357748887e3ca8d7c5a0c16.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/dir_e526f556af6ddef7955f0f6556f0f4d0.html b/docs/dir_e526f556af6ddef7955f0f6556f0f4d0.html
index 0de720f..adafa14 100644
--- a/docs/dir_e526f556af6ddef7955f0f6556f0f4d0.html
+++ b/docs/dir_e526f556af6ddef7955f0f6556f0f4d0.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/easy_8hpp_source.html b/docs/easy_8hpp_source.html
index f4f04c9..48e98b7 100644
--- a/docs/easy_8hpp_source.html
+++ b/docs/easy_8hpp_source.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -47,7 +47,7 @@ $(function() {
easy.hpp
-
17 #ifndef MASTODON_EASY_CPP_HPP 18 #define MASTODON_EASY_CPP_HPP 26 #include <jsoncpp/json/json.h> 30 #include "mastodon-cpp.hpp" 32 #include <mastodon-cpp/mastodon-cpp.hpp> 36 using std::uint_fast64_t;
37 using std::uint_fast16_t;
38 using std::chrono::system_clock;
133 typedef std::map<Easy::notification_type, bool>
alertmap ;
167 explicit Link (
const string &link_header);
174 const uint_fast64_t
next ()
const ;
181 const uint_fast64_t
max_id ()
const ;
188 const uint_fast64_t
prev ()
const ;
195 const uint_fast64_t
since_id ()
const ;
213 explicit Easy (
const string &instance,
const string &access_token);
235 static const std::vector<stream_event>
263 static const string strtime_utc (
const system_clock::time_point &timepoint,
264 const string &format);
273 static const string strtime_local (
const system_clock::time_point &timepoint,
274 const string &format);
314 explicit Entity (
const string &json);
346 virtual const bool valid ()
const = 0;
353 const string error ()
const ;
392 const Json::Value
get (
const string &key)
const ;
399 const string get_string (
const string &key)
const ;
406 const uint_fast64_t
get_uint64 (
const string &key)
const ;
413 const double get_double (
const string &key)
const ;
421 const bool get_bool (
const string &key)
const ;
428 const system_clock::time_point
get_time_point (
const string &key)
const ;
436 const std::vector<string>
get_vector (
const string &key)
const ;
443 const void set (
const string &key,
const Json::Value &value);
445 const std::uint_fast64_t stouint64(
const string &str)
const ;
457 check_valid (
const std::vector<string> &attributes)
const ;
461 mutable bool _was_set;
465 inline static const string strtime
466 (
const system_clock::time_point &timepoint,
467 const string &format,
const bool &utc);
471 #endif // MASTODON_EASY_CPP_HPP Class for the Mastodon API.
Definition: mastodon-cpp.hpp:76
+
17 #ifndef MASTODON_EASY_CPP_HPP 18 #define MASTODON_EASY_CPP_HPP 26 #include <jsoncpp/json/json.h> 30 #include "mastodon-cpp.hpp" 32 #include <mastodon-cpp/mastodon-cpp.hpp> 36 using std::uint_fast64_t;
37 using std::uint_fast16_t;
38 using std::chrono::system_clock;
133 typedef std::map<Easy::notification_type, bool>
alertmap ;
167 explicit Link (
const string &link_header);
174 const uint_fast64_t
next ()
const ;
181 const uint_fast64_t
max_id ()
const ;
188 const uint_fast64_t
prev ()
const ;
195 const uint_fast64_t
since_id ()
const ;
213 explicit Easy (
const string &instance,
const string &access_token);
235 static const std::vector<stream_event>
263 static const string strtime_utc (
const system_clock::time_point &timepoint,
264 const string &format);
273 static const string strtime_local (
const system_clock::time_point &timepoint,
274 const string &format);
314 explicit Entity (
const string &json);
346 virtual const bool valid ()
const = 0;
353 const string error ()
const ;
392 const Json::Value
get (
const string &key)
const ;
399 const string get_string (
const string &key)
const ;
406 const uint_fast64_t
get_uint64 (
const string &key)
const ;
413 const double get_double (
const string &key)
const ;
421 const bool get_bool (
const string &key)
const ;
428 const system_clock::time_point
get_time_point (
const string &key)
const ;
436 const std::vector<string>
get_vector (
const string &key)
const ;
443 const void set (
const string &key,
const Json::Value &value);
445 const std::uint_fast64_t stouint64(
const string &str)
const ;
457 check_valid (
const std::vector<string> &attributes)
const ;
461 mutable bool _was_set;
465 inline static const string strtime
466 (
const system_clock::time_point &timepoint,
467 const string &format,
const bool &utc);
471 #endif // MASTODON_EASY_CPP_HPP Class for the Mastodon API.
Definition: mastodon-cpp.hpp:77
static const string strtime_utc(const system_clock::time_point &timepoint, const string &format)
Converts a time_point to a string.
Definition: easy.cpp:85
Class to hold tags.
Definition: tag.hpp:44
Link(const string &link_header)
Definition: easy.cpp:118
@@ -56,15 +56,14 @@ $(function() {
Entity()
Constructs an empty Entity object.
Definition: entity.cpp:65
Class to hold the Link-header.
Definition: easy.hpp:159
Class to hold notifications.
Definition: notification.hpp:48
-
const Status send_post(const Status &status, uint_fast16_t error=0)
Sends a toot.
Definition: simple_calls.cpp:29
Class to hold attachments.
Definition: attachment.hpp:44
Class to hold cards.
Definition: card.hpp:42
-
const Status send_toot(const Status &status, uint_fast16_t error=0)
Alias for send_post()
Definition: simple_calls.cpp:24
card_type
Describes the card type.
Definition: easy.hpp:96
Child of Mastodon::API with abstract methods.
Definition: easy.hpp:47
const uint_fast64_t prev() const
Returns since_id.
Definition: easy.cpp:146
Class to hold instances.
Definition: instance.hpp:43
Class to hold push subscriptions.
Definition: pushsubscription.hpp:43
+
const Status send_post(const Status &status, uint_fast16_t &error)
Sends a toot.
Definition: simple_calls.cpp:29
static const std::vector< string > json_array_to_vector(const string &json)
Turns a JSON array into a vector of strings.
Definition: easy.cpp:31
const bool check_valid(const std::vector< string > &attributes) const
Checks if an Entity is valid.
Definition: entity.cpp:70
const double get_double(const string &key) const
Returns the value of key as double.
Definition: entity.cpp:163
@@ -84,6 +83,7 @@ $(function() {
Class to hold statuses.
Definition: status.hpp:57
Class to hold accounts.
Definition: account.hpp:46
Class to hold contexts.
Definition: context.hpp:43
+
const Status send_toot(const Status &status, uint_fast16_t &error)
Alias for send_post()
Definition: simple_calls.cpp:24
Definition: mastodon-cpp.hpp:52
Base class for all entities.
Definition: easy.hpp:304
const string error() const
Returns error string sent by the server.
Definition: entity.cpp:84
diff --git a/docs/emoji_8hpp_source.html b/docs/emoji_8hpp_source.html
index 0262f41..fb55efd 100644
--- a/docs/emoji_8hpp_source.html
+++ b/docs/emoji_8hpp_source.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/example01_dump_json_8cpp-example.html b/docs/example01_dump_json_8cpp-example.html
index ebec06e..d9a8cc3 100644
--- a/docs/example01_dump_json_8cpp-example.html
+++ b/docs/example01_dump_json_8cpp-example.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/example02_parse_account_8cpp-example.html b/docs/example02_parse_account_8cpp-example.html
index d318e6d..6598470 100644
--- a/docs/example02_parse_account_8cpp-example.html
+++ b/docs/example02_parse_account_8cpp-example.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/example03_mastocron_8cpp-example.html b/docs/example03_mastocron_8cpp-example.html
index bbffcc5..365b767 100644
--- a/docs/example03_mastocron_8cpp-example.html
+++ b/docs/example03_mastocron_8cpp-example.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/example04_update_credentials_8cpp-example.html b/docs/example04_update_credentials_8cpp-example.html
index 53ea1e9..f90847c 100644
--- a/docs/example04_update_credentials_8cpp-example.html
+++ b/docs/example04_update_credentials_8cpp-example.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/example05_follow_unfollow_8cpp-example.html b/docs/example05_follow_unfollow_8cpp-example.html
index 6bae724..5686161 100644
--- a/docs/example05_follow_unfollow_8cpp-example.html
+++ b/docs/example05_follow_unfollow_8cpp-example.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/example06_toot_delete-toot_8cpp-example.html b/docs/example06_toot_delete-toot_8cpp-example.html
index 83f6dcb..8e000cf 100644
--- a/docs/example06_toot_delete-toot_8cpp-example.html
+++ b/docs/example06_toot_delete-toot_8cpp-example.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/example07_register_app_8cpp-example.html b/docs/example07_register_app_8cpp-example.html
index d36dc39..593b524 100644
--- a/docs/example07_register_app_8cpp-example.html
+++ b/docs/example07_register_app_8cpp-example.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/example08_rate_limiting_8cpp-example.html b/docs/example08_rate_limiting_8cpp-example.html
index 125dcbd..7b9c7ac 100644
--- a/docs/example08_rate_limiting_8cpp-example.html
+++ b/docs/example08_rate_limiting_8cpp-example.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/example09_streaming_api_8cpp-example.html b/docs/example09_streaming_api_8cpp-example.html
index c67f209..12e5229 100644
--- a/docs/example09_streaming_api_8cpp-example.html
+++ b/docs/example09_streaming_api_8cpp-example.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/example10_simplify_8cpp-example.html b/docs/example10_simplify_8cpp-example.html
index 2338a1f..e9caa3f 100644
--- a/docs/example10_simplify_8cpp-example.html
+++ b/docs/example10_simplify_8cpp-example.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/example11_post_media_8cpp-example.html b/docs/example11_post_media_8cpp-example.html
index 0ace10f..feab025 100644
--- a/docs/example11_post_media_8cpp-example.html
+++ b/docs/example11_post_media_8cpp-example.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/example12_easy_laststatus_8cpp-example.html b/docs/example12_easy_laststatus_8cpp-example.html
index 7160243..6455d7b 100644
--- a/docs/example12_easy_laststatus_8cpp-example.html
+++ b/docs/example12_easy_laststatus_8cpp-example.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/example13_easy_stream_8cpp-example.html b/docs/example13_easy_stream_8cpp-example.html
index 3270e64..6b3c6b6 100644
--- a/docs/example13_easy_stream_8cpp-example.html
+++ b/docs/example13_easy_stream_8cpp-example.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/example14_easy_treeview_8cpp-example.html b/docs/example14_easy_treeview_8cpp-example.html
index 603f359..2a97e98 100644
--- a/docs/example14_easy_treeview_8cpp-example.html
+++ b/docs/example14_easy_treeview_8cpp-example.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/example15_proxy_8cpp-example.html b/docs/example15_proxy_8cpp-example.html
index 4430394..94fc17f 100644
--- a/docs/example15_proxy_8cpp-example.html
+++ b/docs/example15_proxy_8cpp-example.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/example16_account_fields_8cpp-example.html b/docs/example16_account_fields_8cpp-example.html
index c80b9ad..419b0b4 100644
--- a/docs/example16_account_fields_8cpp-example.html
+++ b/docs/example16_account_fields_8cpp-example.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/examples.html b/docs/examples.html
index ad37135..52d2f60 100644
--- a/docs/examples.html
+++ b/docs/examples.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/files.html b/docs/files.html
index b7a49e2..a935029 100644
--- a/docs/files.html
+++ b/docs/files.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/functions.html b/docs/functions.html
index e93a335..a4f8d9c 100644
--- a/docs/functions.html
+++ b/docs/functions.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -85,7 +85,7 @@ $(function() {
:
Mastodon::Easy::Attachment
Attachment()
-: Mastodon::Easy::Attachment
+: Mastodon::Easy::Attachment
attachment_type
: Mastodon::Easy
diff --git a/docs/functions_b.html b/docs/functions_b.html
index 1b2a5ce..d2d8688 100644
--- a/docs/functions_b.html
+++ b/docs/functions_b.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/functions_c.html b/docs/functions_c.html
index 8c78df1..877a66d 100644
--- a/docs/functions_c.html
+++ b/docs/functions_c.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/functions_d.html b/docs/functions_d.html
index d96e352..ae3131a 100644
--- a/docs/functions_d.html
+++ b/docs/functions_d.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -57,7 +57,7 @@ $(function() {
, Mastodon::Easy::Instance
display_name()
-: Mastodon::Easy::Account
+: Mastodon::Easy::Account
domain_blocking()
: Mastodon::Easy::Relationship
diff --git a/docs/functions_e.html b/docs/functions_e.html
index f1c007a..b62ac25 100644
--- a/docs/functions_e.html
+++ b/docs/functions_e.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/functions_enum.html b/docs/functions_enum.html
index 183813c..5a42f36 100644
--- a/docs/functions_enum.html
+++ b/docs/functions_enum.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/functions_f.html b/docs/functions_f.html
index 22f5ebc..3fd52da 100644
--- a/docs/functions_f.html
+++ b/docs/functions_f.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -49,7 +49,8 @@ $(function() {
: Mastodon::Easy::Status
fields()
-: Mastodon::Easy::Account
+: Mastodon::Easy::Account
+, Mastodon::Easy::Account::Source
fields_pair
: Mastodon::Easy::Account
diff --git a/docs/functions_func.html b/docs/functions_func.html
index 327323a..d3d48b5 100644
--- a/docs/functions_func.html
+++ b/docs/functions_func.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -91,7 +91,7 @@ $(function() {
: Mastodon::Easy::Card
avatar()
-: Mastodon::Easy::Account
+: Mastodon::Easy::Account
avatar_static()
: Mastodon::Easy::Account
diff --git a/docs/functions_func_b.html b/docs/functions_func_b.html
index 8c030da..032524f 100644
--- a/docs/functions_func_b.html
+++ b/docs/functions_func_b.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/functions_func_c.html b/docs/functions_func_c.html
index acdd098..b63fb30 100644
--- a/docs/functions_func_c.html
+++ b/docs/functions_func_c.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/functions_func_d.html b/docs/functions_func_d.html
index 145d41f..39e8817 100644
--- a/docs/functions_func_d.html
+++ b/docs/functions_func_d.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -57,7 +57,7 @@ $(function() {
, Mastodon::Easy::Instance
display_name()
-: Mastodon::Easy::Account
+: Mastodon::Easy::Account
domain_blocking()
: Mastodon::Easy::Relationship
diff --git a/docs/functions_func_e.html b/docs/functions_func_e.html
index a271306..6c41e5d 100644
--- a/docs/functions_func_e.html
+++ b/docs/functions_func_e.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/functions_func_f.html b/docs/functions_func_f.html
index 0fdd993..fe4f75e 100644
--- a/docs/functions_func_f.html
+++ b/docs/functions_func_f.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -49,10 +49,11 @@ $(function() {
: Mastodon::Easy::Status
fields()
-: Mastodon::Easy::Account
+: Mastodon::Easy::Account
+, Mastodon::Easy::Account::Source
file()
-: Mastodon::Easy::Attachment
+: Mastodon::Easy::Attachment
focus()
: Mastodon::Easy::Attachment
diff --git a/docs/functions_func_g.html b/docs/functions_func_g.html
index c17d99a..f8ad198 100644
--- a/docs/functions_func_g.html
+++ b/docs/functions_func_g.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/functions_func_h.html b/docs/functions_func_h.html
index d5200a4..10769d5 100644
--- a/docs/functions_func_h.html
+++ b/docs/functions_func_h.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -71,7 +71,7 @@ $(function() {
: Mastodon::Easy::Tag
History()
-: Mastodon::Easy::Tag::History
+: Mastodon::Easy::Tag::History
html()
: Mastodon::Easy::Card
diff --git a/docs/functions_func_i.html b/docs/functions_func_i.html
index b7229b2..74728bc 100644
--- a/docs/functions_func_i.html
+++ b/docs/functions_func_i.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/functions_func_j.html b/docs/functions_func_j.html
index 4b17618..2b1735b 100644
--- a/docs/functions_func_j.html
+++ b/docs/functions_func_j.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/functions_func_l.html b/docs/functions_func_l.html
index 6ce2d5a..d1be6fb 100644
--- a/docs/functions_func_l.html
+++ b/docs/functions_func_l.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -55,7 +55,7 @@ $(function() {
: Mastodon::Easy::List
locked()
-: Mastodon::Easy::Account
+: Mastodon::Easy::Account
diff --git a/docs/functions_func_m.html b/docs/functions_func_m.html
index ccc9a3b..5e3bb20 100644
--- a/docs/functions_func_m.html
+++ b/docs/functions_func_m.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/functions_func_n.html b/docs/functions_func_n.html
index 000096b..e07412a 100644
--- a/docs/functions_func_n.html
+++ b/docs/functions_func_n.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -51,12 +51,13 @@ $(function() {
note()
: Mastodon::Easy::Account
+, Mastodon::Easy::Account::Source
note_plain()
: Mastodon::Easy::Account
Notification()
-: Mastodon::Easy::Notification
+: Mastodon::Easy::Notification
diff --git a/docs/functions_func_p.html b/docs/functions_func_p.html
index 5e20d62..c1b88cb 100644
--- a/docs/functions_func_p.html
+++ b/docs/functions_func_p.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -62,6 +62,7 @@ $(function() {
privacy()
: Mastodon::Easy::Account
+, Mastodon::Easy::Account::Source
provider_name()
: Mastodon::Easy::Card
@@ -70,7 +71,7 @@ $(function() {
: Mastodon::Easy::Card
PushSubscription()
-: Mastodon::Easy::PushSubscription
+: Mastodon::Easy::PushSubscription
put()
: Mastodon::API
diff --git a/docs/functions_func_r.html b/docs/functions_func_r.html
index bc2946a..c4c9f0f 100644
--- a/docs/functions_func_r.html
+++ b/docs/functions_func_r.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/functions_func_s.html b/docs/functions_func_s.html
index e6a43f3..e552a27 100644
--- a/docs/functions_func_s.html
+++ b/docs/functions_func_s.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -46,14 +46,15 @@ $(function() {
: Mastodon::Easy::PushSubscription
send_post()
-: Mastodon::Easy
+: Mastodon::Easy
send_toot()
-: Mastodon::Easy
+: Mastodon::Easy
sensitive()
: Mastodon::Easy::Account
-, Mastodon::Easy::Status
+, Mastodon::Easy::Account::Source
+, Mastodon::Easy::Status
server_key()
: Mastodon::Easy::PushSubscription
@@ -79,6 +80,9 @@ $(function() {
size_small()
: Mastodon::Easy::Attachment
+
Source()
+: Mastodon::Easy::Account::Source
+
spoiler_text()
: Mastodon::Easy::Status
@@ -89,7 +93,7 @@ $(function() {
:
Mastodon::Easy::Notification
Status()
-: Mastodon::Easy::Status
+: Mastodon::Easy::Status
statuses()
: Mastodon::Easy::Results
diff --git a/docs/functions_func_t.html b/docs/functions_func_t.html
index 4db9734..32617de 100644
--- a/docs/functions_func_t.html
+++ b/docs/functions_func_t.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/functions_func_u.html b/docs/functions_func_u.html
index a033219..84ad89b 100644
--- a/docs/functions_func_u.html
+++ b/docs/functions_func_u.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/functions_func_v.html b/docs/functions_func_v.html
index 1b7034d..89e944d 100644
--- a/docs/functions_func_v.html
+++ b/docs/functions_func_v.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -43,7 +43,8 @@ $(function() {
- v -
diff --git a/docs/functions_func_w.html b/docs/functions_func_w.html
index 067b777..f23082b 100644
--- a/docs/functions_func_w.html
+++ b/docs/functions_func_w.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/functions_g.html b/docs/functions_g.html
index fd377a6..53fd91d 100644
--- a/docs/functions_g.html
+++ b/docs/functions_g.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/functions_h.html b/docs/functions_h.html
index 7877ba7..18d0c5f 100644
--- a/docs/functions_h.html
+++ b/docs/functions_h.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -71,7 +71,7 @@ $(function() {
: Mastodon::Easy::Tag
History()
-: Mastodon::Easy::Tag::History
+: Mastodon::Easy::Tag::History
html()
: Mastodon::Easy::Card
diff --git a/docs/functions_i.html b/docs/functions_i.html
index bfee668..3f28cd4 100644
--- a/docs/functions_i.html
+++ b/docs/functions_i.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/functions_j.html b/docs/functions_j.html
index f44de94..0593131 100644
--- a/docs/functions_j.html
+++ b/docs/functions_j.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/functions_l.html b/docs/functions_l.html
index f5a9001..5271a8a 100644
--- a/docs/functions_l.html
+++ b/docs/functions_l.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -55,7 +55,7 @@ $(function() {
: Mastodon::Easy::List
locked()
-: Mastodon::Easy::Account
+: Mastodon::Easy::Account
diff --git a/docs/functions_m.html b/docs/functions_m.html
index 0ab967e..7a7264c 100644
--- a/docs/functions_m.html
+++ b/docs/functions_m.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/functions_n.html b/docs/functions_n.html
index 986f26a..b4d10bc 100644
--- a/docs/functions_n.html
+++ b/docs/functions_n.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -51,6 +51,7 @@ $(function() {
note()
: Mastodon::Easy::Account
+, Mastodon::Easy::Account::Source
note_plain()
: Mastodon::Easy::Account
diff --git a/docs/functions_p.html b/docs/functions_p.html
index 0240491..14437ee 100644
--- a/docs/functions_p.html
+++ b/docs/functions_p.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -65,6 +65,7 @@ $(function() {
privacy()
: Mastodon::Easy::Account
+, Mastodon::Easy::Account::Source
provider_name()
: Mastodon::Easy::Card
diff --git a/docs/functions_r.html b/docs/functions_r.html
index 6367cbe..3fa8b4e 100644
--- a/docs/functions_r.html
+++ b/docs/functions_r.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/functions_s.html b/docs/functions_s.html
index ada6c5b..5173e9e 100644
--- a/docs/functions_s.html
+++ b/docs/functions_s.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -46,14 +46,15 @@ $(function() {
: Mastodon::Easy::PushSubscription
send_post()
-: Mastodon::Easy
+: Mastodon::Easy
send_toot()
-: Mastodon::Easy
+: Mastodon::Easy
sensitive()
: Mastodon::Easy::Account
-, Mastodon::Easy::Status
+, Mastodon::Easy::Account::Source
+, Mastodon::Easy::Status
server_key()
: Mastodon::Easy::PushSubscription
@@ -79,6 +80,9 @@ $(function() {
size_small()
: Mastodon::Easy::Attachment
+Source()
+: Mastodon::Easy::Account::Source
+
spoiler_text()
: Mastodon::Easy::Status
diff --git a/docs/functions_t.html b/docs/functions_t.html
index 3ab9f37..f44646f 100644
--- a/docs/functions_t.html
+++ b/docs/functions_t.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/functions_type.html b/docs/functions_type.html
index ef32d6d..50fa508 100644
--- a/docs/functions_type.html
+++ b/docs/functions_type.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/functions_u.html b/docs/functions_u.html
index 0eb6071..e5de27b 100644
--- a/docs/functions_u.html
+++ b/docs/functions_u.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/functions_v.html b/docs/functions_v.html
index e85ec47..4642c41 100644
--- a/docs/functions_v.html
+++ b/docs/functions_v.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -49,7 +49,8 @@ $(function() {
: Mastodon::API
valid()
-: Mastodon::Easy::Account
+: Mastodon::Easy::Account::Source
+, Mastodon::Easy::Account
, Mastodon::Easy::Application
, Mastodon::Easy::Attachment
, Mastodon::Easy::Card
@@ -72,7 +73,7 @@ $(function() {
: Mastodon::Easy::Instance
visibility()
-: Mastodon::Easy::Status
+: Mastodon::Easy::Status
visibility_type
: Mastodon::Easy
diff --git a/docs/functions_w.html b/docs/functions_w.html
index 00de21e..0755054 100644
--- a/docs/functions_w.html
+++ b/docs/functions_w.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/hierarchy.html b/docs/hierarchy.html
index 0994127..4037005 100644
--- a/docs/hierarchy.html
+++ b/docs/hierarchy.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -49,24 +49,25 @@ $(function() {
C Mastodon::Easy Child of Mastodon::API with abstract methods
▼ C Mastodon::Easy::Entity Base class for all entities
C Mastodon::Easy::Account Class to hold accounts
- C Mastodon::Easy::Application Class to hold applications
- C Mastodon::Easy::Attachment Class to hold attachments
- C Mastodon::Easy::Card Class to hold cards
- C Mastodon::Easy::Context Class to hold contexts
- C Mastodon::Easy::Emoji Class to hold emojis
- C Mastodon::Easy::Instance Class to hold instances
- C Mastodon::Easy::List Class to hold lists
- C Mastodon::Easy::Mention Class to hold mentions
- C Mastodon::Easy::Notification Class to hold notifications
- C Mastodon::Easy::PushSubscription Class to hold push subscriptions
- C Mastodon::Easy::Relationship Class to hold relationships
- C Mastodon::Easy::Report Class to hold reports
- C Mastodon::Easy::Results Class to hold results
- C Mastodon::Easy::Status Class to hold statuses
- C Mastodon::Easy::Tag Class to hold tags
- C Mastodon::Easy::Tag::History Class to hold Tag history
- C Mastodon::API::http Http class. Do not use this directly
- C Mastodon::Easy::Link Class to hold the Link
-header
+ C Mastodon::Easy::Account::Source Class to hold source attribute
+ C Mastodon::Easy::Application Class to hold applications
+ C Mastodon::Easy::Attachment Class to hold attachments
+ C Mastodon::Easy::Card Class to hold cards
+ C Mastodon::Easy::Context Class to hold contexts
+ C Mastodon::Easy::Emoji Class to hold emojis
+ C Mastodon::Easy::Instance Class to hold instances
+ C Mastodon::Easy::List Class to hold lists
+ C Mastodon::Easy::Mention Class to hold mentions
+ C Mastodon::Easy::Notification Class to hold notifications
+ C Mastodon::Easy::PushSubscription Class to hold push subscriptions
+ C Mastodon::Easy::Relationship Class to hold relationships
+ C Mastodon::Easy::Report Class to hold reports
+ C Mastodon::Easy::Results Class to hold results
+ C Mastodon::Easy::Status Class to hold statuses
+ C Mastodon::Easy::Tag Class to hold tags
+ C Mastodon::Easy::Tag::History Class to hold Tag history
+ C Mastodon::API::http Http class. Do not use this directly
+ C Mastodon::Easy::Link Class to hold the Link
-header
diff --git a/docs/index.html b/docs/index.html
index 0450897..ddb4f21 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -47,19 +47,6 @@ $(function() {
TODO-list
Usage
The HTML reference can be generated with build_doc.sh
, if doxygen is installed. It is also available at doc.schlomp.space/mastodon-cpp/ . There are examples in examples/
.
-Upgrading from below 0.13.0
-
-You have to recompile all applications linking against this library.
-We use a mutex now to guard the string that is being written to. You can get a reference to it with Mastodon::API::http::get_mutex()
(see examples 9 and 13 for more info). This is only relevant for streams.
-
-Upgrading from below 0.10.0
-Mastodon::API::get
, ::get_stream
, ::post
, ::put
and ::del
don't take std::string
as parameter to API-calls anymore, only parametermap
s. The old behaviour is still supported but is deprecated and will be removed in version 1.0.0.
-Upgrading from below 0.7.0
-Your projects will break, sorry. Here are the important changes:
-
-The header location has changed. They are now in mastodon-cpp/
.
-Specific network error messages have been replaced by 15, "Network error". You can get the exceptions from curlpp with Mastodon::API::exceptions(true)
.
-
Most basic example
{C++}
#include <iostream>
#include <string>
#include <mastodon-cpp/mastodon-cpp.hpp>
int main()
{
Mastodon::API masto("social.example.com", "auth_token");
std::string answer;
masto.get(Mastodon::API::v1::accounts_verify_credentials, answer);
std::cout << answer << '\n';
}
Another simple example
Using the Easy
-class.
@@ -83,11 +70,13 @@ $(function() {
15 Network error (curlpp exception)
-100 - 999 HTTP status codes
+ 16 Timeout
+100 - 999 HTTP status codes
+
65535 Unknown error
- If you use a debug build, you get more verbose error messages. Errors 20-25 are no longer in use (since 0.8.9).
+If you use a debug build, you get more verbose error messages.
Useful links
https://github.com/tootsuite/documentation/blob/master/Using-the-API/API.md "Mastodon API reference"
@@ -95,27 +84,26 @@ $(function() {
Install
Packages
-Every release includes packages for the package managers of Gentoo, Debian and Red Hat.
+Every release includes packages for the package managers of Debian and Red Hat. Gentoo packages are available in an overlay.
Gentoo
Add my repository and install it from there.
-eselect repository enable tastytea
echo 'dev-cpp/mastodon-cpp ~amd64' >> /etc/portage/package.keywords/mastodon-cpp
emaint sync -r tastytea
emerge -a dev-cpp/mastodon-cpp
Or put the ebuild into your local overlay and run ebuild <ebuild path> manifest
. Install with emerge mastodon-cpp
.
-DEB and RPM
+eselect repository enable tastytea
echo 'dev-cpp/mastodon-cpp ~amd64' >> /etc/portage/package.keywords/mastodon-cpp
emaint sync -r tastytea
emerge -a dev-cpp/mastodon-cpp
DEB and RPM
Prebuilt DEB and RPM packages for x86_64(amd64) are provided with each release. These packages are automatically built and not tested. Install with dpkg -i
or rpm -i
, respectively.
-To use the DEB package on stretch, you will need libcurlpp0 from buster.
+To use the DEB package on stretch, you will need libcurlpp0 from sid.
From source
Dependencies
Tested OS: Linux
-C++ compiler (tested: gcc 6/7/8)
-cmake (tested: 3.9 / 3.11)
+C++ compiler (tested: gcc 6 / 7 / 8)
+cmake (tested: 3.9 / 3.7)
pkgconfig (tested: 0.29)
-libcurl (tested: 7.60 / 7.52)
-curlpp (tested: 0.8 / 0.7)
+libcurl (tested: 7.61 / 7.60)
+curlpp (tested: 0.8)
Optional
Easy interface & Examples: jsoncpp (tested: 1.8 / 1.7)
Documentation: doxygen (tested: 1.8)
-DEB package: dpkg (tested: 1.18)
-RPM package: rpm (tested: 4.12)
+DEB package: dpkg (tested: 1.19)
+RPM package: rpm (tested: 4.14 / 4.11)
@@ -130,14 +118,13 @@ $(function() {
-DWITHOUT_EASY=ON
to not build the Easy abstractions and to get rid of the jsoncpp-dependency (not recommended)
-DWITH_EXAMPLES=ON
if you want to compile the examples
-DWITH_TESTS=ON
if you want to compile the tests
+-DWITH_STATIC=ON
If you want a static library along with the dynamic one
-DWITH_DOC=ON
if you want to compile the HTML reference
-DWITH_DEB=ON
if you want to be able to generate a deb-package
-DWITH_RPM=ON
if you want to be able to generate an rpm-package
You can run the tests with ctest ..
inside the build directory. To install, run make install
.
Packages
-Gentoo
-Put the ebuild from packages/gentoo
into your local overlay and rename it to match the desired version or use the live-ebuild (mastodon-cpp-9999.ebuild
) to install the development version.
DEB and RPM
Compile with -DWITH_DEB=ON
or -DWITH_RPM=ON
. Run make package
from the build directory to generate a DEB/RPM package.
Other
diff --git a/docs/instance_8hpp_source.html b/docs/instance_8hpp_source.html
index 0b04f59..a29586c 100644
--- a/docs/instance_8hpp_source.html
+++ b/docs/instance_8hpp_source.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/list_8hpp_source.html b/docs/list_8hpp_source.html
index fe627af..b85e9a8 100644
--- a/docs/list_8hpp_source.html
+++ b/docs/list_8hpp_source.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/macros_8hpp_source.html b/docs/macros_8hpp_source.html
index 3c75bc6..81a34ba 100644
--- a/docs/macros_8hpp_source.html
+++ b/docs/macros_8hpp_source.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
diff --git a/docs/mastodon-cpp_8hpp_source.html b/docs/mastodon-cpp_8hpp_source.html
index 95f65d9..b7f99ad 100644
--- a/docs/mastodon-cpp_8hpp_source.html
+++ b/docs/mastodon-cpp_8hpp_source.html
@@ -19,7 +19,7 @@
mastodon-cpp
- 0.18.4
+ 0.18.8
@@ -47,13 +47,13 @@ $(function() {
mastodon-cpp.hpp
-
17 #ifndef MASTODON_CPP_HPP 18 #define MASTODON_CPP_HPP 27 #include <curlpp/cURLpp.hpp> 28 #include <curlpp/Easy.hpp> 30 using std::uint_fast16_t;
100 explicit http (
const API &api,
const string &instance,
101 const string &access_token);
103 const uint_fast16_t request(
const method &meth,
120 const uint_fast16_t request(
const method &meth,
122 const curlpp::Forms &formdata,
142 [[deprecated(
"Will vanish in 1.0.0. Use cancel_stream() instead." )]]
143 const void abort_stream();
159 const string _instance;
160 const string _access_token;
165 const size_t callback_write(
char * data,
size_t size,
size_t nmemb,
167 [[deprecated(
"Will vanish in 1.0.0. Use callback_write() instead." )]]
168 const size_t callback(
char * data,
size_t size,
size_t nmemb,
170 double callback_progress(
double ,
double ,
200 accounts_verify_credentials,
201 accounts_id_followers,
202 accounts_id_following,
203 accounts_id_statuses,
204 accounts_relationships,
224 statuses_id_reblogged_by,
225 statuses_id_favourited_by,
228 timelines_tag_hashtag,
229 timelines_list_list_id,
231 accounts_update_credentials,
234 accounts_id_unfollow,
240 follow_requests_id_authorize,
241 follow_requests_id_reject,
245 notifications_dismiss,
248 statuses_id_unreblog,
249 statuses_id_favourite,
250 statuses_id_unfavourite,
260 streaming_public_local,
290 explicit API (
const string &instance,
const string &access_token);
336 static const string urlencode (
const string &str);
351 static const string urldecode (
const string &str);
371 const string &redirect_uri,
372 const string &scopes,
373 const string &website,
375 string &client_secret,
378 [[deprecated(
"Will vanish in 1.0.0" )]]
380 const string &client_name,
381 const string &redirect_uri,
382 const string &scopes,
383 const string &website,
385 string &client_secret,
404 const string &client_secret,
405 const string &redirect_uri,
407 string &access_token);
409 [[deprecated(
"Will vanish in 1.0.0" )]]
411 const string &client_id,
412 const string &client_secret,
413 const string &redirect_uri,
415 string &access_token);
426 const string get_header (
const string &header)
const ;
467 const void set_proxy (
const string &proxy,
const string &userpw =
"" );
477 const void get_proxy (
string &proxy,
string &userpw)
const ;
528 const uint_fast16_t
get (
const string &call,
string &answer);
530 [[deprecated(
"Will vanish in 1.0.0, use get() without string argument " 533 const string &argument,
536 [[deprecated(
"Will vanish in 1.0.0, use get() without string argument " 539 const string &argument,
560 std::unique_ptr<Mastodon::API::http> &ptr);
577 std::unique_ptr<Mastodon::API::http> &ptr);
593 const uint_fast16_t
get_stream (
const string &call,
595 std::unique_ptr<Mastodon::API::http> &ptr);
597 [[deprecated(
"Will vanish in 1.0.0, use get_stream() without string " 598 "argument instead." )]]
600 const string &argument,
602 std::unique_ptr<Mastodon::API::http> &ptr);
671 const uint_fast16_t
post (
const string &call,
675 [[deprecated(
"Will vanish in 1.0.0, use post() without string argument " 678 const string &argument,
681 [[deprecated(
"Will vanish in 1.0.0, use post() without string argument " 684 const string &argument,
720 const uint_fast16_t
put (
const string &call,
724 [[deprecated(
"Will vanish in 1.0.0, use put() without string argument " 727 const string &argument,
757 const uint_fast16_t
del (
const string &call,
761 [[deprecated(
"Will vanish in 1.0.0, use del() without string argument " 764 const string &argument);
766 [[deprecated(
"Will vanish in 1.0.0, use del() without string argument " 769 const string &argument,
773 const string _instance;
774 string _access_token;
779 string _proxy_userpw;
790 const bool &firstparam =
true );
799 const curlpp::Forms maptoformdata(
const parametermap &map);
Class for the Mastodon API.
Definition: mastodon-cpp.hpp:76
+
17 #ifndef MASTODON_CPP_HPP 18 #define MASTODON_CPP_HPP 27 #include <curlpp/cURLpp.hpp> 28 #include <curlpp/Easy.hpp> 30 using std::uint_fast16_t;
101 explicit http (
const API &api,
const string &instance,
102 const string &access_token);
104 const uint_fast16_t request(
const method &meth,
121 const uint_fast16_t request(
const method &meth,
123 const curlpp::Forms &formdata,
143 [[deprecated(
"Will vanish in 1.0.0. Use cancel_stream() instead." )]]
144 const void abort_stream();
160 const string _instance;
161 const string _access_token;
166 const size_t callback_write(
char * data,
size_t size,
size_t nmemb,
168 [[deprecated(
"Will vanish in 1.0.0. Use callback_write() instead." )]]
169 const size_t callback(
char * data,
size_t size,
size_t nmemb,
171 double callback_progress(
double ,
double ,
201 accounts_verify_credentials,
202 accounts_id_followers,
203 accounts_id_following,
204 accounts_id_statuses,
205 accounts_relationships,
225 statuses_id_reblogged_by,
226 statuses_id_favourited_by,
229 timelines_tag_hashtag,
230 timelines_list_list_id,
232 accounts_update_credentials,
235 accounts_id_unfollow,
241 follow_requests_id_authorize,
242 follow_requests_id_reject,
246 notifications_dismiss,
249 statuses_id_unreblog,
250 statuses_id_favourite,
251 statuses_id_unfavourite,
261 streaming_public_local,
291 explicit API (
const string &instance,
const string &access_token);
337 static const string urlencode (
const string &str);
352 static const string urldecode (
const string &str);
372 const string &redirect_uri,
373 const string &scopes,
374 const string &website,
376 string &client_secret,
379 [[deprecated(
"Will vanish in 1.0.0" )]]
381 const string &client_name,
382 const string &redirect_uri,
383 const string &scopes,
384 const string &website,
386 string &client_secret,
405 const string &client_secret,
406 const string &redirect_uri,
408 string &access_token);
410 [[deprecated(
"Will vanish in 1.0.0" )]]
412 const string &client_id,
413 const string &client_secret,
414 const string &redirect_uri,
416 string &access_token);
427 const string get_header (
const string &header)
const ;
468 const void set_proxy (
const string &proxy,
const string &userpw =
"" );
478 const void get_proxy (
string &proxy,
string &userpw)
const ;
529 const uint_fast16_t
get (
const string &call,
string &answer);
531 [[deprecated(
"Will vanish in 1.0.0, use get() without string argument " 534 const string &argument,
537 [[deprecated(
"Will vanish in 1.0.0, use get() without string argument " 540 const string &argument,
561 std::unique_ptr<Mastodon::API::http> &ptr);
578 std::unique_ptr<Mastodon::API::http> &ptr);
594 const uint_fast16_t
get_stream (
const string &call,
596 std::unique_ptr<Mastodon::API::http> &ptr);
598 [[deprecated(
"Will vanish in 1.0.0, use get_stream() without string " 599 "argument instead." )]]
601 const string &argument,
603 std::unique_ptr<Mastodon::API::http> &ptr);
672 const uint_fast16_t
post (
const string &call,
676 [[deprecated(
"Will vanish in 1.0.0, use post() without string argument " 679 const string &argument,
682 [[deprecated(
"Will vanish in 1.0.0, use post() without string argument " 685 const string &argument,
721 const uint_fast16_t
put (
const string &call,
725 [[deprecated(
"Will vanish in 1.0.0, use put() without string argument " 728 const string &argument,
758 const uint_fast16_t
del (
const string &call,
762 [[deprecated(
"Will vanish in 1.0.0, use del() without string argument " 765 const string &argument);
767 [[deprecated(
"Will vanish in 1.0.0, use del() without string argument " 770 const string &argument,
774 const string _instance;
775 string _access_token;
780 string _proxy_userpw;
791 const bool &firstparam =
true );
800 const curlpp::Forms maptoformdata(
const parametermap &map);
Class for the Mastodon API.
Definition: mastodon-cpp.hpp:77
const uint_fast16_t del(const Mastodon::API::v1 &call, const parametermap ¶meters)
Make a DELETE request which requires parameters.
Definition: delete.cpp:23
static const string urlencode(const string &str)
Percent-encodes a string. This is done automatically, unless you make a custom request.
Definition: mastodon-cpp.cpp:141
static const string urldecode(const string &str)
Decodes a percent-encoded string.
Definition: mastodon-cpp.cpp:146
-
const void get_headers(string &headers) const
Get all headers in a string.
Definition: http.cpp:189
-
v1
A list of all v1 API calls.
Definition: mastodon-cpp.hpp:197
-
v2
A list of all v2 API calls.
Definition: mastodon-cpp.hpp:274
+
const void get_headers(string &headers) const
Get all headers in a string.
Definition: http.cpp:197
+
v1
A list of all v1 API calls.
Definition: mastodon-cpp.hpp:198
+
v2
A list of all v2 API calls.
Definition: mastodon-cpp.hpp:275
const string get_header(const string &header) const
Gets the header from the last answer.
Definition: mastodon-cpp.cpp:262
const uint_fast16_t register_app2(const string &client_id, const string &client_secret, const string &redirect_uri, const string &code, string &access_token)
Register application, step 2/2.
Definition: mastodon-cpp.cpp:227
const void get_proxy(string &proxy, string &userpw) const
For internal use.
Definition: mastodon-cpp.cpp:595
@@ -61,20 +61,20 @@ $(function() {
API(const string &instance, const string &access_token)
Constructs a new API object.
Definition: mastodon-cpp.cpp:30
const void set_proxy(const string &proxy, const string &userpw="")
Sets the proxy.
Definition: mastodon-cpp.cpp:589
const uint_fast16_t get_stream(const Mastodon::API::v1 &call, const parametermap ¶meters, string &answer, std::unique_ptr< Mastodon::API::http > &ptr)
Make a streaming GET request.
Definition: get_stream.cpp:24
-
method
HTTP methods.
Definition: mastodon-cpp.hpp:90
+
method
HTTP methods.
Definition: mastodon-cpp.hpp:91
const uint_fast16_t post(const Mastodon::API::v1 &call, string &answer)
Make a POST request which doesn't require parameters.
Definition: post.cpp:128
const uint_fast16_t patch(const Mastodon::API::v1 &call, const parametermap ¶meters, string &answer)
Make a PATCH request.
Definition: patch.cpp:24
const uint_fast16_t register_app1(const string &client_name, const string &redirect_uri, const string &scopes, const string &website, string &client_id, string &client_secret, string &url)
Register application, step 1/2.
Definition: mastodon-cpp.cpp:163
const uint_fast16_t put(const Mastodon::API::v1 &call, const parametermap ¶meters, string &answer)
Make a PUT request which requires a parameters.
Definition: put.cpp:23
const bool exceptions() const
Returns true if exceptions are turned on, false otherwise.
Definition: mastodon-cpp.cpp:283
Definition: mastodon-cpp.hpp:52
-
std::map< string, std::vector< string > > parametermap
Used for passing parameters.
Definition: mastodon-cpp.hpp:188
+
std::map< string, std::vector< string > > parametermap
Used for passing parameters.
Definition: mastodon-cpp.hpp:189
static const string unescape_html(const string &html)
Replaces HTML entities with UTF-8 characters.
Definition: mastodon-cpp.cpp:288
const string get_instance() const
Returns the instance.
Definition: mastodon-cpp.cpp:52
-
http class. Do not use this directly.
Definition: mastodon-cpp.hpp:84
+
http class. Do not use this directly.
Definition: mastodon-cpp.hpp:85
const string get_useragent() const
Gets the useragent.
Definition: mastodon-cpp.cpp:47
-
const void cancel_stream()
Cancels the stream. Use only with streams.
Definition: http.cpp:220
-
std::mutex & get_mutex()
Gets the mutex guarding the string that is written to.
Definition: http.cpp:230
+
const void cancel_stream()
Cancels the stream. Use only with streams.
Definition: http.cpp:228
+
std::mutex & get_mutex()
Gets the mutex guarding the string that is written to.
Definition: http.cpp:238