mastodon-cpp
0.18.8
|
Class to hold statuses. More...
#include <status.hpp>
Public Member Functions | |
Status (const string &json) | |
Constructs a Status object from a JSON string. More... | |
Status () | |
Constructs an empty Status object. More... | |
virtual const bool | valid () const |
Returns true if the Entity holds valid data. More... | |
const Account | account () const |
Returns an array of matched accounts. More... | |
const Application | application () const |
Returns application from which the status was posted. More... | |
const system_clock::time_point | created_at () const |
Returns time of creation. More... | |
const string | content () const |
Returns content of status. More... | |
Status | content (const string &content) |
Sets content of status. More... | |
const std::vector< Emoji > | emojis () const |
Returns an array of emojis. More... | |
const bool | favourited () const |
Returns true if the user has favourited the status. More... | |
const uint_fast64_t | favourites_count () const |
Returns the number of favourites. More... | |
const uint_fast64_t | id () const |
Returns the ID of the status. More... | |
const uint_fast64_t | in_reply_to_id () const |
Returns the ID of the status it replies to. More... | |
Status | in_reply_to_id (const uint_fast64_t &in_reply_to_id) |
Sets the ID of the status it replies to. More... | |
const uint_fast64_t | in_reply_to_account_id () const |
Returns the ID of the account it replies to. More... | |
const string | language () const |
Returns the language of the status. More... | |
Status | language (const string &language) |
Sets the language of the status. More... | |
const std::vector< Attachment > | media_attachments () const |
Returns the attachments. More... | |
Status | media_attachments (const std::vector< Attachment > &media_attachments) |
Sets the attachments. More... | |
const std::vector< Mention > | mentions () const |
Returns the mentions. More... | |
const bool | muted () const |
Returns true if the user muted the conversation. More... | |
const bool | pinned () const |
Returns true if the status is pinned. More... | |
const Status | reblog () const |
Returns the reblogged Status. More... | |
const bool | reblogged () const |
Returns true if the user has reblogged the status. More... | |
const uint_fast64_t | reblogs_count () const |
Returns the number of reblogs for the status. More... | |
const bool | sensitive () const |
Returns true if the attachments should be hidden by default. More... | |
Status | sensitive (const bool &sensitive) |
Sets sensitive flag for attachments. More... | |
const string | spoiler_text () const |
Returns the spoiler text. More... | |
Status | spoiler_text (const string &spoiler_text) |
Sets the spoiler text. More... | |
const std::vector< Tag > | tags () const |
Returns the tags. More... | |
const string | uri () const |
Returns the Fediverse-unique resource ID. More... | |
const string | url () const |
Returns the URL to the status page. More... | |
const visibility_type | visibility () const |
Returns the visibility of the status. More... | |
Status | visibility (const visibility_type &visibility) |
Sets the visibility of the status. More... | |
Public Member Functions inherited from Mastodon::Easy::Entity | |
Entity (const string &json) | |
Constructs an Entity object from a JSON string. More... | |
Entity () | |
Constructs an empty Entity object. More... | |
const void | from_string (const string &json) |
Replaces the Entity with a new one from a JSON string. More... | |
const Json::Value | to_object () const |
Returns the JSON object of the Entity. More... | |
const string | error () const |
Returns error string sent by the server. More... | |
const bool | was_set () const |
Returns true if the last requested value was set, false if it was unset. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Mastodon::Easy::Entity | |
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 statuses.
|
explicit |
Status::Status | ( | ) |
const Easy::Account Status::account | ( | ) | const |
Returns an array of matched accounts.
const Easy::Application Status::application | ( | ) | const |
Returns application from which the status was posted.
const string Status::content | ( | ) | const |
Returns content of status.
Status Status::content | ( | const string & | content | ) |
Sets content of status.
const system_clock::time_point Status::created_at | ( | ) | const |
Returns time of creation.
const std::vector< Easy::Emoji > Status::emojis | ( | ) | const |
Returns an array of emojis.
const bool Status::favourited | ( | ) | const |
Returns true if the user has favourited the status.
const uint_fast64_t Status::favourites_count | ( | ) | const |
Returns the number of favourites.
const uint_fast64_t Status::id | ( | ) | const |
Returns the ID of the status.
const uint_fast64_t Status::in_reply_to_account_id | ( | ) | const |
Returns the ID of the account it replies to.
const uint_fast64_t Status::in_reply_to_id | ( | ) | const |
Returns the ID of the status it replies to.
Status Status::in_reply_to_id | ( | const uint_fast64_t & | in_reply_to_id | ) |
Sets the ID of the status it replies to.
const string Status::language | ( | ) | const |
Returns the language of the status.
Status Status::language | ( | const string & | language | ) |
Sets the language of the status.
const std::vector< Easy::Attachment > Status::media_attachments | ( | ) | const |
Returns the attachments.
Status Status::media_attachments | ( | const std::vector< Attachment > & | media_attachments | ) |
Sets the attachments.
const std::vector< Easy::Mention > Status::mentions | ( | ) | const |
Returns the mentions.
const bool Status::muted | ( | ) | const |
Returns true if the user muted the conversation.
const bool Status::pinned | ( | ) | const |
Returns true if the status is pinned.
const bool Status::reblogged | ( | ) | const |
Returns true if the user has reblogged the status.
const uint_fast64_t Status::reblogs_count | ( | ) | const |
Returns the number of reblogs for the status.
const bool Status::sensitive | ( | ) | const |
Returns true if the attachments should be hidden by default.
Status Status::sensitive | ( | const bool & | sensitive | ) |
Sets sensitive flag for attachments.
const string Status::spoiler_text | ( | ) | const |
Returns the spoiler text.
Status Status::spoiler_text | ( | const string & | spoiler_text | ) |
Sets the spoiler text.
const std::vector< Easy::Tag > Status::tags | ( | ) | const |
Returns the tags.
const string Status::uri | ( | ) | const |
Returns the Fediverse-unique resource ID.
const string Status::url | ( | ) | const |
Returns the URL to the status page.
|
virtual |
Returns true if the Entity holds valid data.
Implements Mastodon::Easy::Entity.
const Easy::visibility_type Status::visibility | ( | ) | const |
Returns the visibility of the status.
Status Status::visibility | ( | const visibility_type & | visibility | ) |
Sets the visibility of the status.