summaryrefslogtreecommitdiffstats
path: root/src/api.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/api.cpp')
-rw-r--r--src/api.cpp89
1 files changed, 43 insertions, 46 deletions
diff --git a/src/api.cpp b/src/api.cpp
index a86dbad..d78ccb9 100644
--- a/src/api.cpp
+++ b/src/api.cpp
@@ -25,8 +25,7 @@ API::API(const endpoint_type &endpoint)
// TODO: look for a better way.
// NOLINTNEXTLINE(cert-err58-cpp)
-const map<API::endpoint_type,string_view> API::_endpoint_map
-{
+const map<API::endpoint_type, string_view> API::_endpoint_map{
{v1::apps, "/api/v1/apps"},
{v1::apps_verify_credentials, "/api/v1/apps/verify_credentials"},
@@ -67,7 +66,7 @@ const map<API::endpoint_type,string_view> API::_endpoint_map
{v1::follow_requests, "/api/v1/follow_requests"},
{v1::follow_requests_id_authorize,
- "/api/v1/follow_requests/<ID>/authorize"},
+ "/api/v1/follow_requests/<ID>/authorize"},
{v1::follow_requests_id_reject, "/api/v1/follow_requests/<ID>/reject"},
{v1::endorsements, "/api/v1/endorsements"},
@@ -150,7 +149,7 @@ const map<API::endpoint_type,string_view> API::_endpoint_map
{v1::admin_accounts, "/api/v1/admin/accounts"},
{v1::admin_accounts_id, "/api/v1/admin/accounts/<ID>"},
{v1::admin_accounts_account_id_action,
- "/api/v1/admin/accounts/<ACCOUNT_ID>/action"},
+ "/api/v1/admin/accounts/<ACCOUNT_ID>/action"},
{v1::admin_accounts_id_approve, "/api/v1/admin/accounts/<ID>/approve"},
{v1::admin_accounts_id_reject, "/api/v1/admin/accounts/<ID>/reject"},
{v1::admin_accounts_id_enable, "/api/v1/admin/accounts/<ID>/enable"},
@@ -159,39 +158,39 @@ const map<API::endpoint_type,string_view> API::_endpoint_map
{v1::admin_reports, "/api/v1/admin/reports"},
{v1::admin_reports_id, "/api/v1/admin/reports/<ID>"},
{v1::admin_reports_id_assign_to_self,
- "/api/v1/admin/reports/<ID>/assign_to_self"},
+ "/api/v1/admin/reports/<ID>/assign_to_self"},
{v1::admin_reports_id_unassign, "/api/v1/admin/reports/<ID>/unassign"},
{v1::admin_reports_id_resolve, "/api/v1/admin/reports/<ID>/resolve"},
{v1::admin_reports_id_reopen, "/api/v1/admin/reports/<ID>/reopen"},
{v1::pleroma_notifications_read, " /api/v1/pleroma/notifications/read"},
{v1::pleroma_accounts_id_subscribe,
- "/api/v1/pleroma/accounts/<ID>/subscribe"},
+ "/api/v1/pleroma/accounts/<ID>/subscribe"},
{v1::pleroma_accounts_id_unsubscribe,
- "/api/v1/pleroma/accounts/<ID>/unsubscribe"},
+ "/api/v1/pleroma/accounts/<ID>/unsubscribe"},
{v1::pleroma_accounts_id_favourites,
- "/api/v1/pleroma/accounts/<ID>/favourites"},
+ "/api/v1/pleroma/accounts/<ID>/favourites"},
{v1::pleroma_accounts_update_avatar,
- "/api/v1/pleroma/accounts/update_avatar"},
+ "/api/v1/pleroma/accounts/update_avatar"},
{v1::pleroma_accounts_update_banner,
- "/api/v1/pleroma/accounts/update_banner"},
+ "/api/v1/pleroma/accounts/update_banner"},
{v1::pleroma_accounts_update_background,
- "/api/v1/pleroma/accounts/update_background"},
+ "/api/v1/pleroma/accounts/update_background"},
{v1::pleroma_accounts_confirmation_resend,
- "/api/v1/pleroma/accounts/confirmation_resend"},
+ "/api/v1/pleroma/accounts/confirmation_resend"},
{v1::pleroma_mascot, "/api/v1/pleroma/mascot"},
{v1::pleroma_conversations_id_statuses,
- "/api/v1/pleroma/conversations/<ID>/statuses"},
+ "/api/v1/pleroma/conversations/<ID>/statuses"},
{v1::pleroma_conversations_id, "/api/v1/pleroma/conversations/<ID>"},
{v1::pleroma_conversations_id_read,
- "/api/v1/pleroma/conversations/<ID>/read"},
+ "/api/v1/pleroma/conversations/<ID>/read"},
{v1::pleroma_accounts_id_scrobbles,
- "/api/v1/pleroma/accounts/<ID>/scrobbles"},
+ "/api/v1/pleroma/accounts/<ID>/scrobbles"},
{v1::pleroma_scrobble, "/api/v1/pleroma/scrobble"},
{v1::pleroma_statuses_id_reactions_emoji,
- "/api/v1/pleroma/statuses/<ID>/reactions/<EMOJI>"},
+ "/api/v1/pleroma/statuses/<ID>/reactions/<EMOJI>"},
{v1::pleroma_statuses_id_reactions,
- "/api/v1/pleroma/statuses/<ID>/reactions"},
+ "/api/v1/pleroma/statuses/<ID>/reactions"},
{v2::search, "/api/v2/search"},
@@ -206,66 +205,66 @@ const map<API::endpoint_type,string_view> API::_endpoint_map
{pleroma::admin_users_follow, "/api/pleroma/admin/users/follow"},
{pleroma::admin_users_unfollow, "/api/pleroma/admin/users/unfollow"},
{pleroma::admin_users_nickname_toggle_activation,
- "/api/pleroma/admin/users/<NICKNAME>/toggle_activation"},
+ "/api/pleroma/admin/users/<NICKNAME>/toggle_activation"},
{pleroma::admin_users_tag, "/api/pleroma/admin/users/tag"},
{pleroma::admin_users_nickname_permission_group,
- "/api/pleroma/admin/users/<NICKNAME>/permission_group"},
+ "/api/pleroma/admin/users/<NICKNAME>/permission_group"},
{pleroma::admin_users_nickname_permission_group_permission_group,
- "/api/pleroma/admin/users/<NICKNAME>"
- "/permission_group/<PERMISSION_GROUP>"},
+ "/api/pleroma/admin/users/<NICKNAME>"
+ "/permission_group/<PERMISSION_GROUP>"},
{pleroma::admin_users_permission_group_permission_group,
- "/api/pleroma/admin/users/permission_group/<PERMISSION_GROUP>"},
+ "/api/pleroma/admin/users/permission_group/<PERMISSION_GROUP>"},
{pleroma::admin_users_activate, "/api/pleroma/admin/users/activate"},
{pleroma::admin_users_deactivate, "/api/pleroma/admin/users/deactivate"},
{pleroma::admin_users_nickname_or_id,
- "/api/pleroma/admin/users/<NICKNAME_OR_ID>"},
+ "/api/pleroma/admin/users/<NICKNAME_OR_ID>"},
{pleroma::admin_users_nickname_or_id_statuses,
- "/api/pleroma/admin/users/<NICKNAME_OR_ID>/statuses"},
+ "/api/pleroma/admin/users/<NICKNAME_OR_ID>/statuses"},
{pleroma::admin_instances_instance_statuses,
- "/api/pleroma/admin/instances/<INSTANCE>/statuses"},
+ "/api/pleroma/admin/instances/<INSTANCE>/statuses"},
{pleroma::admin_statuses, "/api/pleroma/admin/statuses"},
{pleroma::admin_relay, "/api/pleroma/admin/relay"},
{pleroma::admin_users_invite_token,
- "/api/pleroma/admin/users/invite_token"},
+ "/api/pleroma/admin/users/invite_token"},
{pleroma::admin_users_invites, "/api/pleroma/admin/users/invites"},
{pleroma::admin_users_revoke_invite,
- "/api/pleroma/admin/users/revoke_invite"},
+ "/api/pleroma/admin/users/revoke_invite"},
{pleroma::admin_users_email_invite,
- "/api/pleroma/admin/users/email_invite"},
+ "/api/pleroma/admin/users/email_invite"},
{pleroma::admin_users_nickname_password_reset,
- "/api/pleroma/admin/users/<NICKNAME>/password_reset"},
+ "/api/pleroma/admin/users/<NICKNAME>/password_reset"},
{pleroma::admin_users_nickname_update_credentials,
- "/api/pleroma/admin/users/<NICKNAME>/update_credentials"},
+ "/api/pleroma/admin/users/<NICKNAME>/update_credentials"},
{pleroma::admin_users_force_password_reset,
- "/api/pleroma/admin/users/force_password_reset"},
+ "/api/pleroma/admin/users/force_password_reset"},
{pleroma::admin_reports, "/api/pleroma/admin/reports"},
{pleroma::admin_grouped_reports, "/api/pleroma/admin/grouped_reports"},
{pleroma::admin_reports_id, "/api/pleroma/admin/reports/<ID>"},
{pleroma::admin_reports_id_notes, "/api/pleroma/admin/reports/<ID>/notes"},
{pleroma::admin_reports_report_id_notes_id,
- "/api/pleroma/admin/reports/<REPORT_ID>/notes/<ID>"},
+ "/api/pleroma/admin/reports/<REPORT_ID>/notes/<ID>"},
{pleroma::admin_statuses_id, "/api/pleroma/admin/statuses/<ID>"},
{pleroma::admin_restart, "/api/pleroma/admin/restart"},
{pleroma::admin_config, "/api/pleroma/admin/config"},
{pleroma::admin_config_descriptions,
- "/api/pleroma/admin/config/descriptions"},
+ "/api/pleroma/admin/config/descriptions"},
{pleroma::admin_moderation_log, "/api/pleroma/admin/moderation_log"},
{pleroma::admin_reload_emoji, "/api/pleroma/admin/reload_emoji"},
{pleroma::admin_users_confirm_email,
- "/api/pleroma/admin/users/confirm_email"},
+ "/api/pleroma/admin/users/confirm_email"},
{pleroma::admin_users_resend_confirm_email,
- "/api/pleroma/admin/users/resend_confirm_email"},
+ "/api/pleroma/admin/users/resend_confirm_email"},
{pleroma::admin_stats, "/api/pleroma/admin/stats"},
{pleroma::admin_users_nickname, "/api/pleroma/admin/users/<NICKNAME>"},
{pleroma::admin_users_nickname_activation_status,
- "/api/pleroma/admin/users/<NICKNAME>/activation_status"},
+ "/api/pleroma/admin/users/<NICKNAME>/activation_status"},
{pleroma::admin_reports_id_respond,
- "/api/pleroma/admin/reports/<ID>/respond"},
+ "/api/pleroma/admin/reports/<ID>/respond"},
{pleroma::admin_config_migrate_to_db,
- "/api/pleroma/admin/config/migrate_to_db"},
+ "/api/pleroma/admin/config/migrate_to_db"},
{pleroma::admin_config_migrate_from_db,
- "/api/pleroma/admin/config/migrate_from_db"},
+ "/api/pleroma/admin/config/migrate_from_db"},
{pleroma::emoji, "/api/pleroma/emoji"},
{pleroma::follow_import, "/api/pleroma/follow_import"},
@@ -278,18 +277,16 @@ const map<API::endpoint_type,string_view> API::_endpoint_map
{pleroma::emoji_packs, "/api/pleroma/emoji/packs"},
{pleroma::emoji_packs_name, "/api/pleroma/emoji/packs/<NAME>"},
{pleroma::emoji_packs_name_update_file,
- "/api/pleroma/emoji/packs/<NAME>/update_file"},
+ "/api/pleroma/emoji/packs/<NAME>/update_file"},
{pleroma::emoji_packs_name_update_metadata,
- "/api/pleroma/emoji/packs/<NAME>/update_metadata"},
+ "/api/pleroma/emoji/packs/<NAME>/update_metadata"},
{pleroma::emoji_packs_download_from,
- "/api/pleroma/emoji/packs/download_from"},
- {pleroma::emoji_packs_list_from,
- "/api/pleroma/emoji/packs/list_from"},
+ "/api/pleroma/emoji/packs/download_from"},
+ {pleroma::emoji_packs_list_from, "/api/pleroma/emoji/packs/list_from"},
{pleroma::emoji_packs_name_download_shared,
- "/api/pleroma/emoji/packs/<NAME>/download_shared"},
+ "/api/pleroma/emoji/packs/<NAME>/download_shared"},
{pleroma::account_register, "/api/pleroma/account/register"},
-
};
} // namespace mastodonpp