diff options
Diffstat (limited to 'include/api.hpp')
-rw-r--r-- | include/api.hpp | 172 |
1 files changed, 168 insertions, 4 deletions
diff --git a/include/api.hpp b/include/api.hpp index 72ca3f7..009d902 100644 --- a/include/api.hpp +++ b/include/api.hpp @@ -28,7 +28,9 @@ using std::string_view; using std::variant; /*! - * @brief Holds API endpoints. + * @brief Holds %API endpoints. + * + * Supported %API endpoints: Mastodon 3.0. * * @since 0.1.0 * @@ -46,7 +48,139 @@ public: */ enum class v1 { - instance + apps, + apps_verify_credentials, + + accounts, + accounts_verify_credentials, + accounts_update_credentials, + accounts_id, + accounts_id_statuses, + accounts_id_followers, + accounts_id_following, + accounts_id_lists, + accounts_id_identity_proofs, + accounts_id_follow, + accounts_id_unfollow, + accounts_id_block, + accounts_id_unblock, + accounts_id_mute, + accounts_id_unmute, + accounts_id_pin, + accounts_id_unpin, + accounts_relationships, + accounts_search, + + bookmarks, + + favourites, + + mutes, + + blocks, + + domain_blocks, + + filters, + filters_id, + + reports, + + follow_requests, + follow_requests_id_authorize, + follow_requests_id_reject, + + endorsements, + + featured_tags, + featured_tags_id, + featured_tags_suggestions, + + preferences, + + suggestions, + suggestions_account_id, + + statuses, + statuses_id, + statuses_id_context, + statuses_id_reblogged_by, + statuses_id_favourited_by, + statuses_id_favourite, + statuses_id_unfavourite, + statuses_id_reblog, + statuses_id_unreblog, + statuses_id_bookmark, + statuses_id_unbookmark, + statuses_id_mute, + statuses_id_unmute, + statuses_id_pin, + statuses_id_unpin, + + media, + media_id, + + polls_id, + polls_id_votes, + + scheduled_statuses, + scheduled_statuses_id, + + timelines_public, + timelines_tag_hashtag, + timelines_home, + timelines_list_list_id, + + conversations, + conversations_id, + conversations_id_read, + + lists, + lists_id, + lists_id_accounts, + + markers, + + streaming_health, + streaming_user, + streaming_public, + streaming_public_local, + streaming_hashtag, + streaming_hashtag_local, + streaming_list, + streaming_direct, + + notifications, + notifications_id, + notifications_clear, + notifications_id_dismiss, + + push_subscription, + + instance, + instance_peers, + instance_activity, + + trends, + + directory, + + custom_emojis, + + admin_accounts, + admin_accounts_id, + admin_accounts_account_id_action, + admin_accounts_id_approve, + admin_accounts_id_reject, + admin_accounts_id_enable, + admin_accounts_id_unsilence, + admin_accounts_id_unsuspend, + admin_reports, + admin_reports_id, + admin_reports_id_assign_to_self, + admin_reports_id_unassign, + admin_reports_id_resolve, + admin_reports_id_reopen }; /*! @@ -62,11 +196,41 @@ public: }; /*! - * @brief Type for endpoints. Either API::v1 or API::v2. + * @brief An enumeration of all oauth %API endpoints. + * + * The original `/` are substituted with `_`. + * + * @since 0.1.0 + */ + enum class oauth + { + authorize, + token, + revoke + }; + + /*! + * @brief An enumeration of all other %API endpoints. + * + * These endpoints are directly under `/api/`. + * + * The original `/` are substituted with `_`. + * + * @since 0.1.0 + */ + enum class other + { + proofs, + oembed + }; + + /*! + * @brief Type for endpoints. Can be API::v1, API::v2, API::oauth or + * API::other. * * @since 0.1.0 */ - using endpoint_type = variant<v1,v2>; + using endpoint_type = variant<v1,v2,oauth,other>; /*! * @brief Constructs an API object. You should never need this. |