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 bool valid()
const;
82 const string acct()
const;
89 const string avatar()
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 string id()
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 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 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
virtual bool valid() const
Returns true if the Entity holds valid data.
Definition: account.cpp:32
bool sensitive() const
Returns if media is marked as sensitive by default.
Definition: account.cpp:226
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 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
uint_fast64_t following_count() const
Returns number of people this account follows.
Definition: account.cpp:136
std::pair< const string, const string > fields_pair
Describes a field. Format: name, value.
Definition: account.hpp:54
bool bot() const
Returns true if the account performs automated actions.
Definition: account.cpp:77
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 string header_static() const
Returns URL of static header image.
Definition: account.cpp:152
visibility_type
Describes visibility of toots.
Definition: easy.hpp:69
visibility_type privacy() const
Returns default privacy of new toots.
Definition: account.cpp:210
const string username() const
Returns username (without )
Definition: account.cpp:372
const string display_name() const
Returns display name.
Definition: account.cpp:87
uint_fast64_t statuses_count() const
Returns number of statuses.
Definition: account.cpp:362
Class to hold accounts.
Definition: account.hpp:46
uint_fast64_t followers_count() const
Returns number of followers.
Definition: account.cpp:131
const Account moved() const
If the owner decided to switch accounts, new account is in this attribute.
Definition: account.cpp:183
Definition: mastodon-cpp.hpp:52
virtual bool valid() const
Returns true if the Entity holds valid data.
Definition: account.cpp:239
Base class for all entities.
Definition: easy.hpp:319
visibility_type privacy() const
Returns default privacy of new toots.
Definition: account.cpp:289
bool locked() const
Returns true if the account is locked.
Definition: account.cpp:162
const string id() const
Returns account-ID.
Definition: account.cpp:157
Class to hold source attribute.
Definition: account.hpp:263
Account()
Constructs an empty Account object.
Definition: account.cpp:28
bool sensitive() const
Returns if media is marked as sensitive by default.
Definition: account.cpp:340
const string url() const
Returns URL of the profile.
Definition: account.cpp:367
bool has_moved() const
Returns true if the account has been moved.
Definition: account.cpp:173