mastodon-cpp
0.101.1
|
Class to hold statuses. More...
#include <status.hpp>
Public Member Functions | |
virtual bool | valid () const override |
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 Card | card () const |
Returns card. More... | |
const Easy::time | 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... | |
bool | favourited () const |
Returns true if the user has favourited the status. More... | |
uint64_t | favourites_count () const |
Returns the number of favourites. More... | |
const string | id () const |
Returns the ID of the status. More... | |
const string | in_reply_to_id () const |
Returns the ID of the status it replies to. More... | |
Status | in_reply_to_id (const string &in_reply_to_id) |
Sets the ID of the status it replies to. More... | |
const string | 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) |
Overrides the language of the status (ISO 639-2) 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... | |
bool | muted () const |
Returns true if the user muted the conversation. More... | |
bool | pinned () const |
Returns true if the status is pinned. More... | |
const Status | reblog () const |
Returns the reblogged Status. More... | |
bool | reblogged () const |
Returns true if the user has reblogged the status. More... | |
uint64_t | reblogs_count () const |
Returns the number of reblogs for the status. More... | |
uint64_t | replies_count () const |
Returns the number of replies for the status. More... | |
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... | |
visibility_type | visibility () const |
Returns the visibility of the status. More... | |
Status | visibility (const visibility_type &visibility) |
Sets the visibility of the status. More... | |
Entity (const string &json) | |
Constructs an Entity object from a JSON string. More... | |
Entity (const Json::Value &object) | |
Constructs an Entity object from a JSON object. More... | |
Entity () | |
Constructs an empty Entity object. More... | |
Public Member Functions inherited from Mastodon::Easy::Entity | |
Entity (const string &json) | |
Constructs an Entity object from a JSON string. More... | |
Entity (const Json::Value &object) | |
Constructs an Entity object from a JSON object. More... | |
Entity () | |
Constructs an empty Entity object. More... | |
virtual | ~Entity () |
Destroys the object. More... | |
operator const Json::Value () const | |
void | from_string (const string &json) |
Replaces the Entity with a new one from a JSON string. More... | |
const string | to_string () const |
Returns the JSON of the Entity as string. More... | |
void | from_object (const Json::Value &object) |
Replaces the Entity with a new one from a JSON object. 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... | |
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... | |
uint64_t | get_uint64 (const string &key) const |
Returns the value of key as std::uint64_t. More... | |
double | get_double (const string &key) const |
Returns the value of key as double. More... | |
bool | get_bool (const string &key) const |
Returns the value of key as bool. More... | |
const Easy::time | get_time (const string &key) const |
Returns the value of key as Easy::time. More... | |
const std::vector< string > | get_vector (const string &key) const |
Returns the value of key as vector. More... | |
void | set (const string &key, const Json::Value &value) |
Sets the value of key. More... | |
std::uint64_t | stouint64 (const string &str) const |
Returns value of str as uint64_t. | |
bool | check_valid (const std::vector< string > &attributes) const |
Checks if an Entity is valid. More... | |
Class to hold statuses.
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 Easy::Card Status::card | ( | ) | const |
Returns card.
const string Status::content | ( | ) | const |
Returns content of status.
Status Status::content | ( | const string & | content | ) |
Sets content of status.
const Easy::time Status::created_at | ( | ) | const |
Returns time of creation.
const std::vector< Easy::Emoji > Status::emojis | ( | ) | const |
Returns an array of emojis.
|
explicit |
Constructs an Entity object from a JSON string.
json | JSON string |
|
explicit |
Easy::Entity::Entity |
Constructs an empty Entity object.
bool Status::favourited | ( | ) | const |
Returns true if the user has favourited the status.
uint64_t Status::favourites_count | ( | ) | const |
Returns the number of favourites.
const string Status::id | ( | ) | const |
Returns the ID of the status.
const string Status::in_reply_to_account_id | ( | ) | const |
Returns the ID of the account it replies to.
const string Status::in_reply_to_id | ( | ) | const |
Returns the ID of the status it replies to.
Status Status::in_reply_to_id | ( | const string & | 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 | ) |
Overrides the language of the status (ISO 639-2)
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.
bool Status::muted | ( | ) | const |
Returns true if the user muted the conversation.
bool Status::pinned | ( | ) | const |
Returns true if the status is pinned.
bool Status::reblogged | ( | ) | const |
Returns true if the user has reblogged the status.
uint64_t Status::reblogs_count | ( | ) | const |
Returns the number of reblogs for the status.
uint64_t Status::replies_count | ( | ) | const |
Returns the number of replies for the status.
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.
|
overridevirtual |
Returns true if the Entity holds valid data.
Implements Mastodon::Easy::Entity.
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.