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