From ec08784aa391a13d1e66f3a7aa2d40b6d4dfe352 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 21 Jul 2021 05:22:56 +0000 Subject: [PATCH] API: Added dummy endpoint for featured tags --- .../Api/Mastodon/Accounts/FeaturedTags.php | 42 +++++++++++++++++++ static/routes.config.php | 2 +- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 src/Module/Api/Mastodon/Accounts/FeaturedTags.php diff --git a/src/Module/Api/Mastodon/Accounts/FeaturedTags.php b/src/Module/Api/Mastodon/Accounts/FeaturedTags.php new file mode 100644 index 0000000000..c4a4a561c6 --- /dev/null +++ b/src/Module/Api/Mastodon/Accounts/FeaturedTags.php @@ -0,0 +1,42 @@ +. + * + */ + +namespace Friendica\Module\Api\Mastodon\Accounts; + +use Friendica\Core\System; +use Friendica\Module\BaseApi; + +/** + * @see https://docs.joinmastodon.org/methods/accounts/ + */ +class FeaturedTags extends BaseApi +{ + /** + * @param array $parameters + * @throws \Friendica\Network\HTTPException\InternalServerErrorException + */ + public static function rawContent(array $parameters = []) + { + self::checkAllowedScope(self::SCOPE_READ); + + System::jsonExit([]); + } +} diff --git a/static/routes.config.php b/static/routes.config.php index 6c61e577c2..b4b9c6a535 100644 --- a/static/routes.config.php +++ b/static/routes.config.php @@ -60,7 +60,7 @@ return [ '/accounts' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]], // not supported '/accounts/{id:\d+}' => [Module\Api\Mastodon\Accounts::class, [R::GET ]], '/accounts/{id:\d+}/statuses' => [Module\Api\Mastodon\Accounts\Statuses::class, [R::GET ]], - '/accounts/{id:\d+}/featured_tags' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // @todo + '/accounts/{id:\d+}/featured_tags' => [Module\Api\Mastodon\Accounts\FeaturedTags::class, [R::GET ]], // Dummy, not supported '/accounts/{id:\d+}/followers' => [Module\Api\Mastodon\Accounts\Followers::class, [R::GET ]], '/accounts/{id:\d+}/following' => [Module\Api\Mastodon\Accounts\Following::class, [R::GET ]], '/accounts/{id:\d+}/lists' => [Module\Api\Mastodon\Accounts\Lists::class, [R::GET ]],