Added a lot more version tags to the documentation
the build was successful
Details
the build was successful
Details
That was tedious! 😓
This commit is contained in:
parent
43504f6ef7
commit
7bd17a0ef0
|
@ -41,12 +41,16 @@ namespace Mastodon
|
||||||
{
|
{
|
||||||
/*!
|
/*!
|
||||||
* @brief Child of Mastodon::API with abstract methods.
|
* @brief Child of Mastodon::API with abstract methods.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
class Easy : public API
|
class Easy : public API
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/*!
|
/*!
|
||||||
* @brief Describes the event type
|
* @brief Describes the event type
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
enum class event_type
|
enum class event_type
|
||||||
{
|
{
|
||||||
|
@ -58,6 +62,8 @@ public:
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Describes visibility of toots.
|
* @brief Describes visibility of toots.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
enum class visibility_type
|
enum class visibility_type
|
||||||
{
|
{
|
||||||
|
@ -70,6 +76,8 @@ public:
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Describes the attachment type
|
* @brief Describes the attachment type
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
enum class attachment_type
|
enum class attachment_type
|
||||||
{
|
{
|
||||||
|
@ -82,6 +90,8 @@ public:
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Describes the card type
|
* @brief Describes the card type
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
enum class card_type
|
enum class card_type
|
||||||
{
|
{
|
||||||
|
@ -94,6 +104,8 @@ public:
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Describes the notification type
|
* @brief Describes the notification type
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
enum class notification_type
|
enum class notification_type
|
||||||
{
|
{
|
||||||
|
@ -106,6 +118,8 @@ public:
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Used for stream events.
|
* @brief Used for stream events.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
typedef std::pair<event_type, string> stream_event;
|
typedef std::pair<event_type, string> stream_event;
|
||||||
|
|
||||||
|
@ -113,6 +127,8 @@ public:
|
||||||
* @brief Map of 'notification type' and 'push is requested or not'
|
* @brief Map of 'notification type' and 'push is requested or not'
|
||||||
*
|
*
|
||||||
* Used in PushSubscription::alerts().
|
* Used in PushSubscription::alerts().
|
||||||
|
*
|
||||||
|
* @since 0.13.3
|
||||||
*/
|
*/
|
||||||
typedef std::map<Easy::notification_type, bool> alertmap;
|
typedef std::map<Easy::notification_type, bool> alertmap;
|
||||||
|
|
||||||
|
@ -137,32 +153,44 @@ public:
|
||||||
* @brief Class to hold the `Link`-header.
|
* @brief Class to hold the `Link`-header.
|
||||||
*
|
*
|
||||||
* Extracts max_id and since_id from the `Link`-header
|
* Extracts max_id and since_id from the `Link`-header
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
class Link
|
class Link
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/*!
|
/*!
|
||||||
* @param link_header The content of the `Link` header
|
* @param link_header The content of the `Link` header
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
explicit Link(const string &link_header);
|
explicit Link(const string &link_header);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns max_id
|
* @brief Returns max_id
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast64_t next() const;
|
const uint_fast64_t next() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns max_id
|
* @brief Returns max_id
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast64_t max_id() const;
|
const uint_fast64_t max_id() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns since_id
|
* @brief Returns since_id
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast64_t prev() const;
|
const uint_fast64_t prev() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns since_id
|
* @brief Returns since_id
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast64_t since_id() const;
|
const uint_fast64_t since_id() const;
|
||||||
|
|
||||||
|
@ -179,6 +207,8 @@ public:
|
||||||
*
|
*
|
||||||
* @param instance The hostname of your instance
|
* @param instance The hostname of your instance
|
||||||
* @param access_token The access token
|
* @param access_token The access token
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
explicit Easy(const string &instance, const string &access_token);
|
explicit Easy(const string &instance, const string &access_token);
|
||||||
|
|
||||||
|
@ -188,6 +218,8 @@ public:
|
||||||
* @param json JSON string holding the array
|
* @param json JSON string holding the array
|
||||||
*
|
*
|
||||||
* @return vector of strings or an empty vector on error
|
* @return vector of strings or an empty vector on error
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
static const std::vector<string> json_array_to_vector(const string &json);
|
static const std::vector<string> json_array_to_vector(const string &json);
|
||||||
|
|
||||||
|
@ -197,12 +229,16 @@ public:
|
||||||
* @param streamdata Data from get_stream()
|
* @param streamdata Data from get_stream()
|
||||||
*
|
*
|
||||||
* @return vector of stream events
|
* @return vector of stream events
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
static const std::vector<stream_event>
|
static const std::vector<stream_event>
|
||||||
parse_stream(const std::string &streamdata);
|
parse_stream(const std::string &streamdata);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Gets the links from the last answer
|
* @brief Gets the links from the last answer
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const Link get_link() const;
|
const Link get_link() const;
|
||||||
|
|
||||||
|
@ -248,11 +284,15 @@ public:
|
||||||
* URL.
|
* URL.
|
||||||
*
|
*
|
||||||
* @return The new Easy::Status
|
* @return The new Easy::Status
|
||||||
|
*
|
||||||
|
* @since 0.17.0
|
||||||
*/
|
*/
|
||||||
const Status send_toot(const Status &status, uint_fast16_t error = 0);
|
const Status send_toot(const Status &status, uint_fast16_t error = 0);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Base class for all entities.
|
* @brief Base class for all entities.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
class Entity
|
class Entity
|
||||||
{
|
{
|
||||||
|
@ -261,11 +301,15 @@ public:
|
||||||
* @brief Constructs an Entity object from a JSON string.
|
* @brief Constructs an Entity object from a JSON string.
|
||||||
*
|
*
|
||||||
* @param json JSON string
|
* @param json JSON string
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
explicit Entity(const string &json);
|
explicit Entity(const string &json);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Constructs an empty Entity object.
|
* @brief Constructs an empty Entity object.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
Entity();
|
Entity();
|
||||||
|
|
||||||
|
@ -273,6 +317,8 @@ public:
|
||||||
* @brief Replaces the Entity with a new one from a JSON string.
|
* @brief Replaces the Entity with a new one from a JSON string.
|
||||||
*
|
*
|
||||||
* @param json JSON string
|
* @param json JSON string
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const void from_string(const string &json);
|
const void from_string(const string &json);
|
||||||
|
|
||||||
|
@ -280,16 +326,22 @@ public:
|
||||||
* @brief Returns the JSON object of the Entity
|
* @brief Returns the JSON object of the Entity
|
||||||
*
|
*
|
||||||
* @return JSON object
|
* @return JSON object
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const Json::Value to_object() const;
|
const Json::Value to_object() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns true if the Entity holds valid data
|
* @brief Returns true if the Entity holds valid data
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const bool valid() const;
|
const bool valid() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns error string sent by the server
|
* @brief Returns error string sent by the server
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string error() const;
|
const string error() const;
|
||||||
|
|
||||||
|
@ -318,6 +370,8 @@ public:
|
||||||
* }
|
* }
|
||||||
* }
|
* }
|
||||||
* @endcode
|
* @endcode
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const bool was_set() const;
|
const bool was_set() const;
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,8 @@ namespace Mastodon
|
||||||
{
|
{
|
||||||
/*!
|
/*!
|
||||||
* @brief Class to hold accounts.
|
* @brief Class to hold accounts.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
class Easy::Account : public Easy::Entity
|
class Easy::Account : public Easy::Entity
|
||||||
{
|
{
|
||||||
|
@ -55,11 +57,15 @@ namespace Mastodon
|
||||||
* @brief Constructs an Account object from a JSON string.
|
* @brief Constructs an Account object from a JSON string.
|
||||||
*
|
*
|
||||||
* @param json JSON string
|
* @param json JSON string
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
explicit Account(const string &json);
|
explicit Account(const string &json);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Constructs an empty Account object.
|
* @brief Constructs an empty Account object.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
Account();
|
Account();
|
||||||
|
|
||||||
|
@ -68,31 +74,43 @@ namespace Mastodon
|
||||||
*
|
*
|
||||||
* `username` for users on the same instance, `user@hostname`
|
* `username` for users on the same instance, `user@hostname`
|
||||||
* for users on other instances.
|
* for users on other instances.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string acct() const;
|
const string acct() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns URL of avatar
|
* @brief Returns URL of avatar
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string avatar() const;
|
const string avatar() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns URL of static avatar
|
* @brief Returns URL of static avatar
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string avatar_static() const;
|
const string avatar_static() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns true if the account performs automated actions
|
* @brief Returns true if the account performs automated actions
|
||||||
|
*
|
||||||
|
* @since 0.16.0
|
||||||
*/
|
*/
|
||||||
const bool bot() const;
|
const bool bot() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns time of creation
|
* @brief Returns time of creation
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const system_clock::time_point created_at() const;
|
const system_clock::time_point created_at() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns display name
|
* @brief Returns display name
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string display_name() const;
|
const string display_name() const;
|
||||||
|
|
||||||
|
@ -105,77 +123,107 @@ namespace Mastodon
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns number of followers
|
* @brief Returns number of followers
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast64_t followers_count() const;
|
const uint_fast64_t followers_count() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns number of people this account follows
|
* @brief Returns number of people this account follows
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast64_t following_count() const;
|
const uint_fast64_t following_count() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns URL of header image
|
* @brief Returns URL of header image
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string header() const;
|
const string header() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns URL of static header image
|
* @brief Returns URL of static header image
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string header_static() const;
|
const string header_static() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns account-ID
|
* @brief Returns account-ID
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast64_t id() const;
|
const uint_fast64_t id() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns true if the account is locked
|
* @brief Returns true if the account is locked
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const bool locked() const;
|
const bool locked() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns true if the account has been moved
|
* @brief Returns true if the account has been moved
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const bool has_moved() const;
|
const bool has_moved() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief If the owner decided to switch accounts, new account is in
|
* @brief If the owner decided to switch accounts, new account is in
|
||||||
* this attribute
|
* this attribute
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const Account moved() const;
|
const Account moved() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns note
|
* @brief Returns note
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string note() const;
|
const string note() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns plaintext version of note
|
* @brief Returns plaintext version of note
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string note_plain() const;
|
const string note_plain() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns default privacy of new toots
|
* @brief Returns default privacy of new toots
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const visibility_type privacy() const;
|
const visibility_type privacy() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns if media is marked as sensitive by default
|
* @brief Returns if media is marked as sensitive by default
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const bool sensitive() const;
|
const bool sensitive() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns number of statuses
|
* @brief Returns number of statuses
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast64_t statuses_count() const;
|
const uint_fast64_t statuses_count() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns URL of the profile
|
* @brief Returns URL of the profile
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string url() const;
|
const string url() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns username (without @hostname)
|
* @brief Returns username (without @hostname)
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string username() const;
|
const string username() const;
|
||||||
};
|
};
|
||||||
|
|
|
@ -34,6 +34,8 @@ namespace Mastodon
|
||||||
{
|
{
|
||||||
/*!
|
/*!
|
||||||
* @brief Class to hold applications.
|
* @brief Class to hold applications.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
class Easy::Application : public Easy::Entity
|
class Easy::Application : public Easy::Entity
|
||||||
{
|
{
|
||||||
|
@ -42,21 +44,29 @@ namespace Mastodon
|
||||||
* @brief Constructs an Application object from a JSON string.
|
* @brief Constructs an Application object from a JSON string.
|
||||||
*
|
*
|
||||||
* @param json JSON string
|
* @param json JSON string
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
explicit Application(const string &json);
|
explicit Application(const string &json);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Constructs an empty Application object.
|
* @brief Constructs an empty Application object.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
Application();
|
Application();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the name of the application
|
* @brief Returns the name of the application
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string name() const;
|
const string name() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the website of the application
|
* @brief Returns the website of the application
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string website() const;
|
const string website() const;
|
||||||
};
|
};
|
||||||
|
|
|
@ -38,6 +38,8 @@ namespace Mastodon
|
||||||
{
|
{
|
||||||
/*!
|
/*!
|
||||||
* @brief Class to hold attachments
|
* @brief Class to hold attachments
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
class Easy::Attachment : public Easy::Entity
|
class Easy::Attachment : public Easy::Entity
|
||||||
{
|
{
|
||||||
|
@ -46,31 +48,43 @@ namespace Mastodon
|
||||||
* @brief Constructs an Attachment object from a JSON string.
|
* @brief Constructs an Attachment object from a JSON string.
|
||||||
*
|
*
|
||||||
* @param json JSON string
|
* @param json JSON string
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
explicit Attachment(const string &json);
|
explicit Attachment(const string &json);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Constructs an empty Attachment object.
|
* @brief Constructs an empty Attachment object.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
Attachment();
|
Attachment();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Aspect of original image
|
* @brief Aspect of original image
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const double aspect() const;
|
const double aspect() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Aspect of preview image
|
* @brief Aspect of preview image
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const double aspect_small() const;
|
const double aspect_small() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the bitrate of a video
|
* @brief Returns the bitrate of a video
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast64_t bitrate() const;
|
const uint_fast64_t bitrate() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the image description
|
* @brief Returns the image description
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string description() const;
|
const string description() const;
|
||||||
|
|
||||||
|
@ -83,6 +97,8 @@ namespace Mastodon
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the duration of a video in seconds
|
* @brief Returns the duration of a video in seconds
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const std::chrono::duration<double> duration() const;
|
const std::chrono::duration<double> duration() const;
|
||||||
|
|
||||||
|
@ -106,6 +122,8 @@ namespace Mastodon
|
||||||
* @brief Returns the focus point (x, y)
|
* @brief Returns the focus point (x, y)
|
||||||
*
|
*
|
||||||
* Values are between -1.0 and 1.0.
|
* Values are between -1.0 and 1.0.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const std::array<double, 2> focus() const;
|
const std::array<double, 2> focus() const;
|
||||||
|
|
||||||
|
@ -120,66 +138,92 @@ namespace Mastodon
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the framerate of a video in frames per second
|
* @brief Returns the framerate of a video in frames per second
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const double framerate() const;
|
const double framerate() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the height of the original image
|
* @brief Returns the height of the original image
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast64_t height() const;
|
const uint_fast64_t height() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the height of the preview image
|
* @brief Returns the height of the preview image
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast64_t height_small() const;
|
const uint_fast64_t height_small() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the ID of the attachment
|
* @brief Returns the ID of the attachment
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast64_t id() const;
|
const uint_fast64_t id() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the URL of the preview image
|
* @brief Returns the URL of the preview image
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string preview_url() const;
|
const string preview_url() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the remote URL of the original image
|
* @brief Returns the remote URL of the original image
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string remote_url() const;
|
const string remote_url() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the size of the original image
|
* @brief Returns the size of the original image
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string size() const;
|
const string size() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the size of the preview image
|
* @brief Returns the size of the preview image
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string size_small() const;
|
const string size_small() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns shorter URL for the image
|
* @brief Returns shorter URL for the image
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string text_url() const;
|
const string text_url() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns attachment type
|
* @brief Returns attachment type
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const attachment_type type() const;
|
const attachment_type type() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns URL of the locally hosted version of the image
|
* @brief Returns URL of the locally hosted version of the image
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string url() const;
|
const string url() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the width of the original image
|
* @brief Returns the width of the original image
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast64_t width() const;
|
const uint_fast64_t width() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the width of the preview image
|
* @brief Returns the width of the preview image
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast64_t width_small() const;
|
const uint_fast64_t width_small() const;
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,8 @@ namespace Mastodon
|
||||||
{
|
{
|
||||||
/*!
|
/*!
|
||||||
* @brief Class to hold cards
|
* @brief Class to hold cards
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
class Easy::Card : public Easy::Entity
|
class Easy::Card : public Easy::Entity
|
||||||
{
|
{
|
||||||
|
@ -44,71 +46,99 @@ namespace Mastodon
|
||||||
* @brief Constructs a Card object from a JSON string.
|
* @brief Constructs a Card object from a JSON string.
|
||||||
*
|
*
|
||||||
* @param json JSON string
|
* @param json JSON string
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
explicit Card(const string &json);
|
explicit Card(const string &json);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Constructs an empty Card object.
|
* @brief Constructs an empty Card object.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
Card();
|
Card();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the name of the author
|
* @brief Returns the name of the author
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string author_name() const;
|
const string author_name() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the URL of the author
|
* @brief Returns the URL of the author
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string author_url() const;
|
const string author_url() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the description
|
* @brief Returns the description
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string description() const;
|
const string description() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the height of the card
|
* @brief Returns the height of the card
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast64_t height() const;
|
const uint_fast64_t height() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the HTML
|
* @brief Returns the HTML
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string html() const;
|
const string html() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the URL of the image associated with the card
|
* @brief Returns the URL of the image associated with the card
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string image() const;
|
const string image() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the name of the provider
|
* @brief Returns the name of the provider
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string provider_name() const;
|
const string provider_name() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the URL of the provider
|
* @brief Returns the URL of the provider
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string provider_url() const;
|
const string provider_url() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the title
|
* @brief Returns the title
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string title() const;
|
const string title() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the type of the card
|
* @brief Returns the type of the card
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const Easy::card_type type() const;
|
const Easy::card_type type() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the URL associated with the card
|
* @brief Returns the URL associated with the card
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string url() const;
|
const string url() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the width of the card
|
* @brief Returns the width of the card
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast64_t width() const;
|
const uint_fast64_t width() const;
|
||||||
};
|
};
|
||||||
|
|
|
@ -37,6 +37,8 @@ namespace Mastodon
|
||||||
{
|
{
|
||||||
/*!
|
/*!
|
||||||
* @brief Class to hold contexts
|
* @brief Class to hold contexts
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
class Easy::Context : public Easy::Entity
|
class Easy::Context : public Easy::Entity
|
||||||
{
|
{
|
||||||
|
@ -45,21 +47,29 @@ namespace Mastodon
|
||||||
* @brief Constructs a Context object from a JSON string.
|
* @brief Constructs a Context object from a JSON string.
|
||||||
*
|
*
|
||||||
* @param json JSON string
|
* @param json JSON string
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
explicit Context(const string &json);
|
explicit Context(const string &json);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Constructs an empty Context object.
|
* @brief Constructs an empty Context object.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
Context();
|
Context();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the ancestors of the Status as vector of Statuses
|
* @brief Returns the ancestors of the Status as vector of Statuses
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const std::vector<Status> ancestors() const;
|
const std::vector<Status> ancestors() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the descendants of the Status as vector of Statuses
|
* @brief Returns the descendants of the Status as vector of Statuses
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const std::vector<Status> descendants() const;
|
const std::vector<Status> descendants() const;
|
||||||
};
|
};
|
||||||
|
|
|
@ -34,6 +34,8 @@ namespace Mastodon
|
||||||
{
|
{
|
||||||
/*!
|
/*!
|
||||||
* @brief Class to hold emojis
|
* @brief Class to hold emojis
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
class Easy::Emoji : public Easy::Entity
|
class Easy::Emoji : public Easy::Entity
|
||||||
{
|
{
|
||||||
|
@ -42,26 +44,36 @@ namespace Mastodon
|
||||||
* @brief Constructs an Emoji object from a JSON string.
|
* @brief Constructs an Emoji object from a JSON string.
|
||||||
*
|
*
|
||||||
* @param json JSON string
|
* @param json JSON string
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
explicit Emoji(const string &json);
|
explicit Emoji(const string &json);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Constructs an empty Emoji object.
|
* @brief Constructs an empty Emoji object.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
Emoji();
|
Emoji();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the shortcode of the emoji
|
* @brief Returns the shortcode of the emoji
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string shortcode() const;
|
const string shortcode() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the URL to the emoji static image
|
* @brief Returns the URL to the emoji static image
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string static_url() const;
|
const string static_url() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the URL to the emoji image
|
* @brief Returns the URL to the emoji image
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string url() const;
|
const string url() const;
|
||||||
};
|
};
|
||||||
|
|
|
@ -37,6 +37,8 @@ namespace Mastodon
|
||||||
{
|
{
|
||||||
/*!
|
/*!
|
||||||
* @brief Class to hold instances
|
* @brief Class to hold instances
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
class Easy::Instance : public Easy::Entity
|
class Easy::Instance : public Easy::Entity
|
||||||
{
|
{
|
||||||
|
@ -45,53 +47,73 @@ namespace Mastodon
|
||||||
* @brief Constructs an Instance object from a JSON string.
|
* @brief Constructs an Instance object from a JSON string.
|
||||||
*
|
*
|
||||||
* @param json JSON string
|
* @param json JSON string
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
explicit Instance(const string &json);
|
explicit Instance(const string &json);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Constructs an empty Instance object.
|
* @brief Constructs an empty Instance object.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
Instance();
|
Instance();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the Account of the admin or another contact person
|
* @brief Returns the Account of the admin or another contact person
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const Account contact_account() const;
|
const Account contact_account() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the description of the instance
|
* @brief Returns the description of the instance
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string description() const;
|
const string description() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the email address which can be used to contact the
|
* @brief Returns the email address which can be used to contact the
|
||||||
* instance administrator
|
* instance administrator
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string email() const;
|
const string email() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns a vector of ISO 6391 language codes the instance has
|
* @brief Returns a vector of ISO 6391 language codes the instance has
|
||||||
* chosen to advertise
|
* chosen to advertise
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const std::vector<string> languages() const;
|
const std::vector<string> languages() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the title of the instance
|
* @brief Returns the title of the instance
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string title() const;
|
const string title() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the URI of the instance
|
* @brief Returns the URI of the instance
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string uri() const;
|
const string uri() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the version used by the instance
|
* @brief Returns the version used by the instance
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string version() const;
|
const string version() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the URL for the streaming API
|
* @brief Returns the URL for the streaming API
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string streaming_api() const;
|
const string streaming_api() const;
|
||||||
};
|
};
|
||||||
|
|
|
@ -37,6 +37,8 @@ namespace Mastodon
|
||||||
{
|
{
|
||||||
/*!
|
/*!
|
||||||
* @brief Class to hold lists
|
* @brief Class to hold lists
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
class Easy::List : public Easy::Entity
|
class Easy::List : public Easy::Entity
|
||||||
{
|
{
|
||||||
|
@ -45,21 +47,29 @@ namespace Mastodon
|
||||||
* @brief Constructs a List object from a JSON string.
|
* @brief Constructs a List object from a JSON string.
|
||||||
*
|
*
|
||||||
* @param json JSON string
|
* @param json JSON string
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
explicit List(const string &json);
|
explicit List(const string &json);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Constructs an empty List object.
|
* @brief Constructs an empty List object.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
List();
|
List();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns list-ID
|
* @brief Returns list-ID
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast64_t id() const;
|
const uint_fast64_t id() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns title
|
* @brief Returns title
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string title() const;
|
const string title() const;
|
||||||
};
|
};
|
||||||
|
|
|
@ -37,6 +37,8 @@ namespace Mastodon
|
||||||
{
|
{
|
||||||
/*!
|
/*!
|
||||||
* @brief Class to hold mentions
|
* @brief Class to hold mentions
|
||||||
|
*
|
||||||
|
* before 0.11.0
|
||||||
*/
|
*/
|
||||||
class Easy::Mention : public Easy::Entity
|
class Easy::Mention : public Easy::Entity
|
||||||
{
|
{
|
||||||
|
@ -45,31 +47,43 @@ namespace Mastodon
|
||||||
* @brief Constructs a Mention object from a JSON string.
|
* @brief Constructs a Mention object from a JSON string.
|
||||||
*
|
*
|
||||||
* @param json JSON string
|
* @param json JSON string
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
explicit Mention(const string &json);
|
explicit Mention(const string &json);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Constructs an empty Mention object.
|
* @brief Constructs an empty Mention object.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
Mention();
|
Mention();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns acct
|
* @brief Returns acct
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string acct() const;
|
const string acct() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns account ID
|
* @brief Returns account ID
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast64_t id() const;
|
const uint_fast64_t id() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the URL of user's profile
|
* @brief Returns the URL of user's profile
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string url() const;
|
const string url() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the username of the account
|
* @brief Returns the username of the account
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string username() const;
|
const string username() const;
|
||||||
};
|
};
|
||||||
|
|
|
@ -42,6 +42,8 @@ namespace Mastodon
|
||||||
{
|
{
|
||||||
/*!
|
/*!
|
||||||
* @brief Class to hold notifications
|
* @brief Class to hold notifications
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
class Easy::Notification : public Easy::Entity
|
class Easy::Notification : public Easy::Entity
|
||||||
{
|
{
|
||||||
|
@ -50,37 +52,51 @@ namespace Mastodon
|
||||||
* @brief Constructs a Notification object from a JSON string.
|
* @brief Constructs a Notification object from a JSON string.
|
||||||
*
|
*
|
||||||
* @param json JSON string
|
* @param json JSON string
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
explicit Notification(const string &json);
|
explicit Notification(const string &json);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Constructs an empty Notification object.
|
* @brief Constructs an empty Notification object.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
Notification();
|
Notification();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the Account sending the notification to the user
|
* @brief Returns the Account sending the notification to the user
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const Account account() const;
|
const Account account() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns time of creation
|
* @brief Returns time of creation
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const system_clock::time_point created_at() const;
|
const system_clock::time_point created_at() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns notification ID
|
* @brief Returns notification ID
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast64_t id() const;
|
const uint_fast64_t id() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the Status associated with the notification, if
|
* @brief Returns the Status associated with the notification, if
|
||||||
* applicable
|
* applicable
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const Status status() const;
|
const Status status() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns notification type
|
* @brief Returns notification type
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const Easy::notification_type type() const;
|
const Easy::notification_type type() const;
|
||||||
};
|
};
|
||||||
|
|
|
@ -47,26 +47,36 @@ namespace Mastodon
|
||||||
* @brief Constructs an PushSubscription object from a JSON string.
|
* @brief Constructs an PushSubscription object from a JSON string.
|
||||||
*
|
*
|
||||||
* @param json JSON string
|
* @param json JSON string
|
||||||
|
*
|
||||||
|
* @since 0.14.0
|
||||||
*/
|
*/
|
||||||
explicit PushSubscription(const string &json);
|
explicit PushSubscription(const string &json);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Constructs an empty PushSubscription object.
|
* @brief Constructs an empty PushSubscription object.
|
||||||
|
*
|
||||||
|
* @since 0.14.0
|
||||||
*/
|
*/
|
||||||
PushSubscription();
|
PushSubscription();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns push subscription ID
|
* @brief Returns push subscription ID
|
||||||
|
*
|
||||||
|
* @since 0.14.0
|
||||||
*/
|
*/
|
||||||
const uint_fast64_t id() const;
|
const uint_fast64_t id() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the endpoint URL
|
* @brief Returns the endpoint URL
|
||||||
|
*
|
||||||
|
* @since 0.14.0
|
||||||
*/
|
*/
|
||||||
const string endpoint() const;
|
const string endpoint() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the server public key for signature verification
|
* @brief Returns the server public key for signature verification
|
||||||
|
*
|
||||||
|
* @since 0.14.0
|
||||||
*/
|
*/
|
||||||
const string server_key() const;
|
const string server_key() const;
|
||||||
|
|
||||||
|
@ -74,6 +84,8 @@ namespace Mastodon
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns a map of 'notification event type' and
|
* @brief Returns a map of 'notification event type' and
|
||||||
* 'push is requested or not'
|
* 'push is requested or not'
|
||||||
|
*
|
||||||
|
* @since 0.14.0
|
||||||
*/
|
*/
|
||||||
const Easy::alertmap alerts() const;
|
const Easy::alertmap alerts() const;
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,8 @@ namespace Mastodon
|
||||||
{
|
{
|
||||||
/*!
|
/*!
|
||||||
* @brief Class to hold relationships
|
* @brief Class to hold relationships
|
||||||
|
*
|
||||||
|
* before 0.11.0
|
||||||
*/
|
*/
|
||||||
class Easy::Relationship : public Easy::Entity
|
class Easy::Relationship : public Easy::Entity
|
||||||
{
|
{
|
||||||
|
@ -44,51 +46,71 @@ namespace Mastodon
|
||||||
* @brief Constructs a Relationship object from a JSON string.
|
* @brief Constructs a Relationship object from a JSON string.
|
||||||
*
|
*
|
||||||
* @param json JSON string
|
* @param json JSON string
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
explicit Relationship(const string &json);
|
explicit Relationship(const string &json);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Constructs an empty Relationship object.
|
* @brief Constructs an empty Relationship object.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
Relationship();
|
Relationship();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns true if the user is blocking the account
|
* @brief Returns true if the user is blocking the account
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const bool blocking() const;
|
const bool blocking() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns true if the user is blocking the account's domain
|
* @brief Returns true if the user is blocking the account's domain
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const bool domain_blocking() const;
|
const bool domain_blocking() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns true if the user is being followed by the account
|
* @brief Returns true if the user is being followed by the account
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const bool followed_by() const;
|
const bool followed_by() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns true if the user is being following the account
|
* @brief Returns true if the user is being following the account
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const bool following() const;
|
const bool following() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the target account ID
|
* @brief Returns the target account ID
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast64_t id() const;
|
const uint_fast64_t id() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns true if the user is muting the account
|
* @brief Returns true if the user is muting the account
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const bool muting() const;
|
const bool muting() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns true if the user is also muting notifications
|
* @brief Returns true if the user is also muting notifications
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const bool muting_notifications() const;
|
const bool muting_notifications() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns true if the user has requested to follow the account
|
* @brief Returns true if the user has requested to follow the account
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const bool requested() const;
|
const bool requested() const;
|
||||||
};
|
};
|
||||||
|
|
|
@ -36,6 +36,8 @@ namespace Mastodon
|
||||||
{
|
{
|
||||||
/*!
|
/*!
|
||||||
* @brief Class to hold reports
|
* @brief Class to hold reports
|
||||||
|
*
|
||||||
|
* before 0.11.0
|
||||||
*/
|
*/
|
||||||
class Easy::Report : public Easy::Entity
|
class Easy::Report : public Easy::Entity
|
||||||
{
|
{
|
||||||
|
@ -44,22 +46,30 @@ namespace Mastodon
|
||||||
* @brief Constructs a Report object from a JSON string.
|
* @brief Constructs a Report object from a JSON string.
|
||||||
*
|
*
|
||||||
* @param json JSON string
|
* @param json JSON string
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
explicit Report(const string &json);
|
explicit Report(const string &json);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Constructs an empty Report object.
|
* @brief Constructs an empty Report object.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
Report();
|
Report();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns true if an action was taken in response to the
|
* @brief Returns true if an action was taken in response to the
|
||||||
* report
|
* report
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const bool action_taken() const;
|
const bool action_taken() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the ID of the report
|
* @brief Returns the ID of the report
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast64_t id() const;
|
const uint_fast64_t id() const;
|
||||||
};
|
};
|
||||||
|
|
|
@ -41,6 +41,8 @@ namespace Mastodon
|
||||||
{
|
{
|
||||||
/*!
|
/*!
|
||||||
* @brief Class to hold results
|
* @brief Class to hold results
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
class Easy::Results : public Easy::Entity
|
class Easy::Results : public Easy::Entity
|
||||||
{
|
{
|
||||||
|
@ -49,21 +51,29 @@ namespace Mastodon
|
||||||
* @brief Constructs a Results object from a JSON string.
|
* @brief Constructs a Results object from a JSON string.
|
||||||
*
|
*
|
||||||
* @param json JSON string
|
* @param json JSON string
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
explicit Results(const string &json);
|
explicit Results(const string &json);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Constructs an empty Results object.
|
* @brief Constructs an empty Results object.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
Results();
|
Results();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns an array of matched Accounts
|
* @brief Returns an array of matched Accounts
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const std::vector<Account> accounts() const;
|
const std::vector<Account> accounts() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns an array of matched Statuses
|
* @brief Returns an array of matched Statuses
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const std::vector<Status> statuses() const;
|
const std::vector<Status> statuses() const;
|
||||||
|
|
||||||
|
@ -83,6 +93,8 @@ namespace Mastodon
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Alias for hashtags_v1
|
* @brief Alias for hashtags_v1
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
[[deprecated("Will vanish in 1.0.0, use hashtags_v1() instead")]]
|
[[deprecated("Will vanish in 1.0.0, use hashtags_v1() instead")]]
|
||||||
const std::vector<string> hashtags() const;
|
const std::vector<string> hashtags() const;
|
||||||
|
|
|
@ -51,6 +51,8 @@ namespace Mastodon
|
||||||
{
|
{
|
||||||
/*!
|
/*!
|
||||||
* @brief Class to hold statuses
|
* @brief Class to hold statuses
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
class Easy::Status : public Easy::Entity
|
class Easy::Status : public Easy::Entity
|
||||||
{
|
{
|
||||||
|
@ -59,31 +61,43 @@ namespace Mastodon
|
||||||
* @brief Constructs a Status object from a JSON string.
|
* @brief Constructs a Status object from a JSON string.
|
||||||
*
|
*
|
||||||
* @param json JSON string
|
* @param json JSON string
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
explicit Status(const string &json);
|
explicit Status(const string &json);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Constructs an empty Status object.
|
* @brief Constructs an empty Status object.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
Status();
|
Status();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns an array of matched accounts.
|
* @brief Returns an array of matched accounts.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const Account account() const;
|
const Account account() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns application from which the status was posted.
|
* @brief Returns application from which the status was posted.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const Application application() const;
|
const Application application() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns time of creation
|
* @brief Returns time of creation
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const system_clock::time_point created_at() const;
|
const system_clock::time_point created_at() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns content of status
|
* @brief Returns content of status
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string content() const;
|
const string content() const;
|
||||||
|
|
||||||
|
@ -96,26 +110,36 @@ namespace Mastodon
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns an array of emojis
|
* @brief Returns an array of emojis
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const std::vector<Emoji> emojis() const;
|
const std::vector<Emoji> emojis() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns true if the user has favourited the status
|
* @brief Returns true if the user has favourited the status
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const bool favourited() const;
|
const bool favourited() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the number of favourites
|
* @brief Returns the number of favourites
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast64_t favourites_count() const;
|
const uint_fast64_t favourites_count() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the ID of the status
|
* @brief Returns the ID of the status
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast64_t id() const;
|
const uint_fast64_t id() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the ID of the status it replies to
|
* @brief Returns the ID of the status it replies to
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast64_t in_reply_to_id() const;
|
const uint_fast64_t in_reply_to_id() const;
|
||||||
|
|
||||||
|
@ -128,11 +152,15 @@ namespace Mastodon
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the ID of the account it replies to
|
* @brief Returns the ID of the account it replies to
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast64_t in_reply_to_account_id() const;
|
const uint_fast64_t in_reply_to_account_id() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the language of the status
|
* @brief Returns the language of the status
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string language() const;
|
const string language() const;
|
||||||
|
|
||||||
|
@ -145,6 +173,8 @@ namespace Mastodon
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the attachments
|
* @brief Returns the attachments
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const std::vector<Attachment> media_attachments() const;
|
const std::vector<Attachment> media_attachments() const;
|
||||||
|
|
||||||
|
@ -158,36 +188,50 @@ namespace Mastodon
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the mentions
|
* @brief Returns the mentions
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const std::vector<Mention> mentions() const;
|
const std::vector<Mention> mentions() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns true if the user muted the conversation
|
* @brief Returns true if the user muted the conversation
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const bool muted() const;
|
const bool muted() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns true if the status is pinned
|
* @brief Returns true if the status is pinned
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const bool pinned() const;
|
const bool pinned() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the reblogged Status
|
* @brief Returns the reblogged Status
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const Status reblog() const;
|
const Status reblog() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns true if the user has reblogged the status
|
* @brief Returns true if the user has reblogged the status
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const bool reblogged() const;
|
const bool reblogged() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the number of reblogs for the status
|
* @brief Returns the number of reblogs for the status
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast64_t reblogs_count() const;
|
const uint_fast64_t reblogs_count() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns true if the attachments should be hidden by default
|
* @brief Returns true if the attachments should be hidden by default
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const bool sensitive() const;
|
const bool sensitive() const;
|
||||||
|
|
||||||
|
@ -200,6 +244,8 @@ namespace Mastodon
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the spoiler text
|
* @brief Returns the spoiler text
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string spoiler_text() const;
|
const string spoiler_text() const;
|
||||||
|
|
||||||
|
@ -212,21 +258,29 @@ namespace Mastodon
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the tags
|
* @brief Returns the tags
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const std::vector<Tag> tags() const;
|
const std::vector<Tag> tags() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the Fediverse-unique resource ID
|
* @brief Returns the Fediverse-unique resource ID
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string uri() const;
|
const string uri() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the URL to the status page
|
* @brief Returns the URL to the status page
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string url() const;
|
const string url() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the visibility of the status
|
* @brief Returns the visibility of the status
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const visibility_type visibility() const;
|
const visibility_type visibility() const;
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,8 @@ namespace Mastodon
|
||||||
{
|
{
|
||||||
/*!
|
/*!
|
||||||
* @brief Class to hold tags.
|
* @brief Class to hold tags.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
class Easy::Tag : public Easy::Entity
|
class Easy::Tag : public Easy::Entity
|
||||||
{
|
{
|
||||||
|
@ -54,25 +56,36 @@ namespace Mastodon
|
||||||
* @brief Constructs an Tag::History object from a JSON string.
|
* @brief Constructs an Tag::History object from a JSON string.
|
||||||
*
|
*
|
||||||
* @param json JSON string
|
* @param json JSON string
|
||||||
|
*
|
||||||
|
* @since 0.16.0
|
||||||
*/
|
*/
|
||||||
explicit History(const string &json);
|
explicit History(const string &json);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Constructs an empty Tag::History object.
|
* @brief Constructs an empty Tag::History object.
|
||||||
|
*
|
||||||
|
* @since 0.16.0
|
||||||
*/
|
*/
|
||||||
History();
|
History();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the number of accounts using that hashtag.
|
* @brief Returns the number of accounts using that hashtag.
|
||||||
|
*
|
||||||
|
* @since 0.16.0
|
||||||
*/
|
*/
|
||||||
const uint_fast64_t accounts();
|
const uint_fast64_t accounts();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the day.
|
* @brief Returns the day.
|
||||||
|
*
|
||||||
|
* @since 0.16.0
|
||||||
*/
|
*/
|
||||||
const system_clock::time_point day();
|
const system_clock::time_point day();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the number of accounts using that hashtag.
|
* @brief Returns the number of accounts using that hashtag.
|
||||||
|
*
|
||||||
|
* @since 0.16.0
|
||||||
*/
|
*/
|
||||||
const uint_fast64_t uses();
|
const uint_fast64_t uses();
|
||||||
};
|
};
|
||||||
|
@ -81,21 +94,29 @@ namespace Mastodon
|
||||||
* @brief Constructs an Tag object from a JSON string.
|
* @brief Constructs an Tag object from a JSON string.
|
||||||
*
|
*
|
||||||
* @param json JSON string
|
* @param json JSON string
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
explicit Tag(const string &json);
|
explicit Tag(const string &json);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Constructs an empty Tag object.
|
* @brief Constructs an empty Tag object.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
Tag();
|
Tag();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the name of the tag
|
* @brief Returns the name of the tag
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string name() const;
|
const string name() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the URL of the tag
|
* @brief Returns the URL of the tag
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string url() const;
|
const string url() const;
|
||||||
|
|
||||||
|
|
|
@ -70,12 +70,16 @@ namespace Mastodon
|
||||||
* | 15 | Network error (curlpp exception) |
|
* | 15 | Network error (curlpp exception) |
|
||||||
* | 100 - 999 | HTTP status codes |
|
* | 100 - 999 | HTTP status codes |
|
||||||
* | 65535 | Unknown error |
|
* | 65535 | Unknown error |
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
class API
|
class API
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/*!
|
/*!
|
||||||
* @brief http class. Do not use this directly.
|
* @brief http class. Do not use this directly.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
class http
|
class http
|
||||||
{
|
{
|
||||||
|
@ -110,6 +114,8 @@ public:
|
||||||
*
|
*
|
||||||
* @return @ref error "Error code". If the URL has permanently changed,
|
* @return @ref error "Error code". If the URL has permanently changed,
|
||||||
* 13 is returned and answer is set to the new URL.
|
* 13 is returned and answer is set to the new URL.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast16_t request(const method &meth,
|
const uint_fast16_t request(const method &meth,
|
||||||
const string &path,
|
const string &path,
|
||||||
|
@ -143,6 +149,8 @@ public:
|
||||||
* specified in get_stream().
|
* specified in get_stream().
|
||||||
*
|
*
|
||||||
* @return A reference of the mutex.
|
* @return A reference of the mutex.
|
||||||
|
*
|
||||||
|
* @since 0.12.3
|
||||||
*/
|
*/
|
||||||
std::mutex &get_mutex();
|
std::mutex &get_mutex();
|
||||||
|
|
||||||
|
@ -174,12 +182,17 @@ public:
|
||||||
* {"field2", { "value" } }
|
* {"field2", { "value" } }
|
||||||
* }
|
* }
|
||||||
* @endcode
|
* @endcode
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
typedef std::map<string, std::vector<string>> parametermap;
|
typedef std::map<string, std::vector<string>> parametermap;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief A list of all API calls.
|
* @brief A list of all v1 API calls.
|
||||||
*
|
*
|
||||||
* The original `/` are substituted by `_`.
|
* The original `/` are substituted by `_`.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
enum class v1
|
enum class v1
|
||||||
{
|
{
|
||||||
|
@ -251,6 +264,13 @@ public:
|
||||||
push_subscription
|
push_subscription
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief A list of all v2 API calls.
|
||||||
|
*
|
||||||
|
* The original `/` are substituted by `_`.
|
||||||
|
*
|
||||||
|
* @since 0.16.0
|
||||||
|
*/
|
||||||
enum class v2
|
enum class v2
|
||||||
{
|
{
|
||||||
search
|
search
|
||||||
|
@ -264,6 +284,8 @@ public:
|
||||||
*
|
*
|
||||||
* @param instance The hostname of your instance
|
* @param instance The hostname of your instance
|
||||||
* @param access_token Your access token.
|
* @param access_token Your access token.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
explicit API(const string &instance, const string &access_token);
|
explicit API(const string &instance, const string &access_token);
|
||||||
|
|
||||||
|
@ -271,6 +293,8 @@ public:
|
||||||
* @brief Sets the useragent. Default is mastodon-cpp/version.
|
* @brief Sets the useragent. Default is mastodon-cpp/version.
|
||||||
*
|
*
|
||||||
* @param useragent The useragent
|
* @param useragent The useragent
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const void set_useragent(const string &useragent);
|
const void set_useragent(const string &useragent);
|
||||||
|
|
||||||
|
@ -278,6 +302,8 @@ public:
|
||||||
* @brief Gets the useragent.
|
* @brief Gets the useragent.
|
||||||
*
|
*
|
||||||
* @return The useragent.
|
* @return The useragent.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string get_useragent() const;
|
const string get_useragent() const;
|
||||||
|
|
||||||
|
@ -285,6 +311,8 @@ public:
|
||||||
* @brief Returns the instance.
|
* @brief Returns the instance.
|
||||||
*
|
*
|
||||||
* @return The instance.
|
* @return The instance.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string get_instance() const;
|
const string get_instance() const;
|
||||||
|
|
||||||
|
@ -302,6 +330,8 @@ public:
|
||||||
* @param str The string
|
* @param str The string
|
||||||
*
|
*
|
||||||
* @return The percent-encoded string
|
* @return The percent-encoded string
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
static const string urlencode(const string &str);
|
static const string urlencode(const string &str);
|
||||||
|
|
||||||
|
@ -319,6 +349,8 @@ public:
|
||||||
*
|
*
|
||||||
* @return @ref error "Error code". If the URL has permanently changed, 13
|
* @return @ref error "Error code". If the URL has permanently changed, 13
|
||||||
* is returned and url is set to the new URL.
|
* is returned and url is set to the new URL.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast16_t register_app1(const string &client_name,
|
const uint_fast16_t register_app1(const string &client_name,
|
||||||
const string &redirect_uri,
|
const string &redirect_uri,
|
||||||
|
@ -350,6 +382,8 @@ public:
|
||||||
* @param access_token Returned
|
* @param access_token Returned
|
||||||
*
|
*
|
||||||
* @return @ref error "Error code".
|
* @return @ref error "Error code".
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast16_t register_app2(const string &client_id,
|
const uint_fast16_t register_app2(const string &client_id,
|
||||||
const string &client_secret,
|
const string &client_secret,
|
||||||
|
@ -371,6 +405,8 @@ public:
|
||||||
* @param header The header to get
|
* @param header The header to get
|
||||||
*
|
*
|
||||||
* @return The header, or "" on error.
|
* @return The header, or "" on error.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const string get_header(const string &header) const;
|
const string get_header(const string &header) const;
|
||||||
|
|
||||||
|
@ -383,6 +419,8 @@ public:
|
||||||
* @param value true for on, false for off
|
* @param value true for on, false for off
|
||||||
*
|
*
|
||||||
* @return true if exceptions are turned on, false otherwise
|
* @return true if exceptions are turned on, false otherwise
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
bool exceptions(const bool &value);
|
bool exceptions(const bool &value);
|
||||||
|
|
||||||
|
@ -431,6 +469,8 @@ public:
|
||||||
* empty string.
|
* empty string.
|
||||||
*
|
*
|
||||||
* @return @ref error "Error code".
|
* @return @ref error "Error code".
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast16_t get(const Mastodon::API::v1 &call, string &answer);
|
const uint_fast16_t get(const Mastodon::API::v1 &call, string &answer);
|
||||||
|
|
||||||
|
@ -467,6 +507,8 @@ public:
|
||||||
*
|
*
|
||||||
* @return @ref error "Error code". If the URL has permanently changed, 13
|
* @return @ref error "Error code". If the URL has permanently changed, 13
|
||||||
* is returned and answer is set to the new URL.
|
* is returned and answer is set to the new URL.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast16_t get(const string &call, string &answer);
|
const uint_fast16_t get(const string &call, string &answer);
|
||||||
|
|
||||||
|
@ -494,6 +536,8 @@ public:
|
||||||
*
|
*
|
||||||
* @return @ref error "Error code". If the URL has permanently changed, 13
|
* @return @ref error "Error code". If the URL has permanently changed, 13
|
||||||
* is returned and answer is set to the new URL.
|
* 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 uint_fast16_t get_stream(const Mastodon::API::v1 &call,
|
||||||
const parametermap ¶meters,
|
const parametermap ¶meters,
|
||||||
|
@ -510,6 +554,8 @@ public:
|
||||||
*
|
*
|
||||||
* @return @ref error "Error code". If the URL has permanently changed, 13
|
* @return @ref error "Error code". If the URL has permanently changed, 13
|
||||||
* is returned and answer is set to the new URL.
|
* 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 uint_fast16_t get_stream(const Mastodon::API::v1 &call,
|
||||||
string &answer,
|
string &answer,
|
||||||
|
@ -526,6 +572,8 @@ public:
|
||||||
*
|
*
|
||||||
* @return @ref error "Error code". If the URL has permanently changed, 13
|
* @return @ref error "Error code". If the URL has permanently changed, 13
|
||||||
* is returned and answer is set to the new URL.
|
* is returned and answer is set to the new URL.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast16_t get_stream(const string &call,
|
const uint_fast16_t get_stream(const string &call,
|
||||||
string &answer,
|
string &answer,
|
||||||
|
@ -550,6 +598,8 @@ public:
|
||||||
*
|
*
|
||||||
* @return @ref error "Error code". If the URL has permanently changed, 13
|
* @return @ref error "Error code". If the URL has permanently changed, 13
|
||||||
* is returned and answer is set to the new URL.
|
* is returned and answer is set to the new URL.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast16_t patch(const Mastodon::API::v1 &call,
|
const uint_fast16_t patch(const Mastodon::API::v1 &call,
|
||||||
const parametermap ¶meters,
|
const parametermap ¶meters,
|
||||||
|
@ -564,6 +614,8 @@ public:
|
||||||
*
|
*
|
||||||
* @return @ref error "Error code". If the URL has permanently changed, 13
|
* @return @ref error "Error code". If the URL has permanently changed, 13
|
||||||
* is returned and answer is set to the new URL.
|
* is returned and answer is set to the new URL.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast16_t post(const Mastodon::API::v1 &call, string &answer);
|
const uint_fast16_t post(const Mastodon::API::v1 &call, string &answer);
|
||||||
|
|
||||||
|
@ -579,6 +631,8 @@ public:
|
||||||
*
|
*
|
||||||
* @return @ref error "Error code". If the URL has permanently changed, 13
|
* @return @ref error "Error code". If the URL has permanently changed, 13
|
||||||
* is returned and answer is set to the new URL.
|
* is returned and answer is set to the new URL.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast16_t post(const Mastodon::API::v1 &call,
|
const uint_fast16_t post(const Mastodon::API::v1 &call,
|
||||||
const parametermap ¶meters,
|
const parametermap ¶meters,
|
||||||
|
@ -596,6 +650,8 @@ public:
|
||||||
*
|
*
|
||||||
* @return @ref error "Error code". If the URL has permanently changed, 13
|
* @return @ref error "Error code". If the URL has permanently changed, 13
|
||||||
* is returned and answer is set to the new URL.
|
* is returned and answer is set to the new URL.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast16_t post(const string &call,
|
const uint_fast16_t post(const string &call,
|
||||||
const parametermap ¶meters,
|
const parametermap ¶meters,
|
||||||
|
@ -625,6 +681,8 @@ public:
|
||||||
*
|
*
|
||||||
* @return @ref error "Error code". If the URL has permanently changed, 13
|
* @return @ref error "Error code". If the URL has permanently changed, 13
|
||||||
* is returned and answer is set to the new URL.
|
* is returned and answer is set to the new URL.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast16_t put(const Mastodon::API::v1 &call,
|
const uint_fast16_t put(const Mastodon::API::v1 &call,
|
||||||
const parametermap ¶meters,
|
const parametermap ¶meters,
|
||||||
|
@ -641,6 +699,8 @@ public:
|
||||||
*
|
*
|
||||||
* @return @ref error "Error code". If the URL has permanently changed, 13
|
* @return @ref error "Error code". If the URL has permanently changed, 13
|
||||||
* is returned and answer is set to the new URL.
|
* is returned and answer is set to the new URL.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast16_t put(const string &call,
|
const uint_fast16_t put(const string &call,
|
||||||
const parametermap ¶meters,
|
const parametermap ¶meters,
|
||||||
|
@ -660,6 +720,8 @@ public:
|
||||||
* @param parameters A Mastodon::API::parametermap containing parameters
|
* @param parameters A Mastodon::API::parametermap containing parameters
|
||||||
*
|
*
|
||||||
* @return @ref error "Error code".
|
* @return @ref error "Error code".
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast16_t del(const Mastodon::API::v1 &call,
|
const uint_fast16_t del(const Mastodon::API::v1 &call,
|
||||||
const parametermap ¶meters);
|
const parametermap ¶meters);
|
||||||
|
@ -674,6 +736,8 @@ public:
|
||||||
*
|
*
|
||||||
* @return @ref error "Error code". If the URL has permanently changed, 13
|
* @return @ref error "Error code". If the URL has permanently changed, 13
|
||||||
* is returned and answer is set to the new URL.
|
* is returned and answer is set to the new URL.
|
||||||
|
*
|
||||||
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
const uint_fast16_t del(const string &call,
|
const uint_fast16_t del(const string &call,
|
||||||
const parametermap ¶meters,
|
const parametermap ¶meters,
|
||||||
|
|
Reference in New Issue