From 22c217d3da4dd1dc3781eb4a3738d0f1e5b01dfe Mon Sep 17 00:00:00 2001 From: tastytea Date: Sat, 17 Nov 2018 20:54:23 +0100 Subject: [PATCH] Added GET /api/v1/endorsements, POST /api/v1/accounts/:id/pin, POST /api/v1/accounts/:id/unpin --- src/api/get.cpp | 3 +++ src/api/post.cpp | 6 ++++++ src/mastodon-cpp.hpp | 3 +++ 3 files changed, 12 insertions(+) diff --git a/src/api/get.cpp b/src/api/get.cpp index 7327b57..dc71342 100644 --- a/src/api/get.cpp +++ b/src/api/get.cpp @@ -144,6 +144,9 @@ const uint_fast16_t API::get(const Mastodon::API::v1 &call, case v1::push_subscription: strcall = "/api/v1/push/subscription"; break; + case v1::endorsements: + strcall = "/api/v1/endorsements"; + break; default: ttdebug << "ERROR: Invalid call.\n"; return 11; diff --git a/src/api/post.cpp b/src/api/post.cpp index 9856eaf..0cb6667 100644 --- a/src/api/post.cpp +++ b/src/api/post.cpp @@ -116,6 +116,12 @@ const uint_fast16_t API::post(const Mastodon::API::v1 &call, case v1::push_subscription: strcall = "/api/v1/push/subscription"; break; + case v1::accounts_id_pin: + strcall = "/api/v1/accounts/" + strid + "/pin"; + break; + case v1::accounts_id_unpin: + strcall = "/api/v1/accounts/" + strid + "/unpin"; + break; default: ttdebug << "ERROR: Invalid call.\n"; return 11; diff --git a/src/mastodon-cpp.hpp b/src/mastodon-cpp.hpp index 27294fa..3af9875 100644 --- a/src/mastodon-cpp.hpp +++ b/src/mastodon-cpp.hpp @@ -206,6 +206,7 @@ public: accounts_search, blocks, domain_blocks, + endorsements, favourites, follow_requests, instance, @@ -237,6 +238,8 @@ public: accounts_id_unblock, accounts_id_mute, accounts_id_unmute, + accounts_id_pin, + accounts_id_unpin, apps, follow_requests_id_authorize, follow_requests_id_reject,