/* This file is part of mastodonpp. * Copyright © 2020 tastytea * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ #include "api.hpp" namespace mastodonpp { API::API(const endpoint_type &endpoint) : _endpoint{endpoint} {} // TODO: look for a better way. // NOLINTNEXTLINE(cert-err58-cpp) const map API::_endpoint_map { {v1::apps, "/api/v1/apps"}, {v1::apps_verify_credentials, "/api/v1/apps/verify_credentials"}, {v1::accounts, "/api/v1/accounts"}, {v1::accounts_verify_credentials, "/api/v1/accounts/verify_credentials"}, {v1::accounts_update_credentials, "/api/v1/accounts/update_credentials"}, {v1::accounts_id, "/api/v1/accounts/"}, {v1::accounts_id_statuses, "/api/v1/accounts//statuses"}, {v1::accounts_id_followers, "/api/v1/accounts//followers"}, {v1::accounts_id_following, "/api/v1/accounts//following"}, {v1::accounts_id_lists, "/api/v1/accounts//lists"}, {v1::accounts_id_identity_proofs, "/api/v1/accounts//identity_proofs"}, {v1::accounts_id_follow, "/api/v1/accounts//follow"}, {v1::accounts_id_unfollow, "/api/v1/accounts//unfollow"}, {v1::accounts_id_block, "/api/v1/accounts//block"}, {v1::accounts_id_unblock, "/api/v1/accounts//unblock"}, {v1::accounts_id_mute, "/api/v1/accounts//mute"}, {v1::accounts_id_unmute, "/api/v1/accounts//unmute"}, {v1::accounts_id_pin, "/api/v1/accounts//pin"}, {v1::accounts_id_unpin, "/api/v1/accounts//unpin"}, {v1::accounts_relationships, "/api/v1/accounts/relationships"}, {v1::accounts_search, "/api/v1/accounts/search"}, {v1::bookmarks, "/api/v1/bookmarks"}, {v1::favourites, "/api/v1/favourites"}, {v1::mutes, "/api/v1/mutes"}, {v1::blocks, "/api/v1/blocks"}, {v1::domain_blocks, "/api/v1/domain_blocks"}, {v1::filters, "/api/v1/filters"}, {v1::filters_id, "/api/v1/filters/"}, {v1::reports, "/api/v1/reports"}, {v1::follow_requests, "/api/v1/follow_requests"}, {v1::follow_requests_id_authorize, "/api/v1/follow_requests//authorize"}, {v1::follow_requests_id_reject, "/api/v1/follow_requests//reject"}, {v1::endorsements, "/api/v1/endorsements"}, {v1::featured_tags, "/api/v1/featured/tags"}, {v1::featured_tags_id, "/api/v1/featured_tags/"}, {v1::featured_tags_suggestions, "/api/v1/featured_tags/suggestions"}, {v1::preferences, "/api/v1/preferences"}, {v1::suggestions, "/api/v1/suggestions"}, {v1::suggestions_account_id, "/api/v1/suggestions/account/"}, {v1::statuses, "/api/v1/statuses"}, {v1::statuses_id, "/api/v1/statuses/"}, {v1::statuses_id_context, "/api/v1/statuses//context"}, {v1::statuses_id_reblogged_by, "/api/v1/statuses//reblogged_by"}, {v1::statuses_id_favourited_by, "/api/v1/statuses//favourited_by"}, {v1::statuses_id_favourite, "/api/v1/statuses//favourite"}, {v1::statuses_id_unfavourite, "/api/v1/statuses//unfavourite"}, {v1::statuses_id_reblog, "/api/v1/statuses//reblog"}, {v1::statuses_id_unreblog, "/api/v1/statuses//unreblog"}, {v1::statuses_id_bookmark, "/api/v1/statuses//bookmark"}, {v1::statuses_id_unbookmark, "/api/v1/statuses//unbookmark"}, {v1::statuses_id_mute, "/api/v1/statuses//mute"}, {v1::statuses_id_unmute, "/api/v1/statuses//unmute"}, {v1::statuses_id_pin, "/api/v1/statuses//pin"}, {v1::statuses_id_unpin, "/api/v1/statuses//unpin"}, {v1::media, "/api/v1/media"}, {v1::media_id, "/api/v1/media/"}, {v1::polls_id, "/api/v1/polls/"}, {v1::polls_id_votes, "/api/v1/polls//votes"}, {v1::scheduled_statuses, "/api/v1/scheduled_statuses"}, {v1::scheduled_statuses_id, "/api/v1/scheduled_statuses/"}, {v1::timelines_public, "/api/v1/timeline
/*  This file is part of mastodonpp.
 *  Copyright © 2020 tastytea <tastytea@tastytea.de>
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Affero General Public License as published by
 *  the Free Software Foundation, version 3.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Affero General Public License for more details.
 *
 *  You should have received a copy of the GNU Affero General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.