<?php
/**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
$profileRoutes = [
'' => [Module\Profile\Index::class, [R::GET]],
'/profile' => [Module\Profile\Profile::class, [R::GET]],
+ '/schedule' => [Module\Profile\Schedule::class, [R::GET, R::POST]],
'/contacts/common' => [Module\Profile\Common::class, [R::GET]],
'/contacts[/{type}]' => [Module\Profile\Contacts::class, [R::GET]],
'/status[/{category}[/{date1}[/{date2}]]]' => [Module\Profile\Status::class, [R::GET]],
+ '/media' => [Module\Profile\Media::class, [R::GET]],
+];
+
+$apiRoutes = [
+ '/account' => [
+ '/verify_credentials[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/rate_limit_status[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/update_profile[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ '/update_profile_image[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ ],
+
+ '/blocks/list[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/conversation/show[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/direct_messages' => [
+ '/all[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/conversation[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/destroy[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::DELETE, R::POST]],
+ '/new[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ '/sent[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ ],
+ '/direct_messages[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET, R::POST]],
+
+ '/externalprofile/show[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/favorites/create[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ '/favorites/destroy[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class , [R::DELETE, R::POST]],
+ '/favorites[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/followers/ids[.{extension:json|xml|rss|atom}]' => [Module\Api\Twitter\FollowersIds::class, [R::GET ]],
+ '/followers/list[.{extension:json|xml|rss|atom}]' => [Module\Api\Twitter\FollowersList::class, [R::GET ]],
+ '/friends/ids[.{extension:json|xml|rss|atom}]' => [Module\Api\Twitter\FriendsIds::class, [R::GET ]],
+ '/friends/list[.{extension:json|xml|rss|atom}]' => [Module\Api\Twitter\FriendsList::class, [R::GET ]],
+ '/friendships/destroy[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ '/friendships/incoming[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+
+ '/friendica' => [
+ '/activity/attendmaybe[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ '/activity/attendno[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ '/activity/attendyes[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ '/activity/dislike[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ '/activity/like[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ '/activity/unattendmaybe[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ '/activity/unattendno[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ '/activity/unattendyes[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ '/activity/undislike[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ '/activity/unlike[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ '/notification/seen[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ '/notification[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/direct_messages_setseen[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ '/direct_messages_search[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/events[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Events\Index::class, [R::GET ]],
+ '/group_show[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/group_create[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ '/group_delete[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::DELETE ]],
+ '/group_update[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ '/profile/show[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Profile\Show::class, [R::GET ]],
+ '/photoalbum/delete[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::DELETE ]],
+ '/photoalbum/update[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ '/photos/list[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/photo/create[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ '/photo/delete[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::DELETE ]],
+ '/photo/update[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ '/photo[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ ],
+
+ '/gnusocial/config[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/gnusocial/version[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/help/test[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+
+ '/lists' => [
+ '/create[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ '/destroy[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::DELETE, R::POST]],
+ '/list[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/ownerships[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/statuses[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/subscriptions[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/update[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ ],
+
+ '/media/upload[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ '/media/metadata/create[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ '/saved_searches/list[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/search/tweets[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/search[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/statusnet/config[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/statusnet/conversation[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/statusnet/conversation/{id:\d+}[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/statusnet/version[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+
+ '/statuses' => [
+ '/destroy[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::DELETE, R::POST]],
+ '/followers[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/friends[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/friends_timeline[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/home_timeline[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/mediap[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ '/mentions[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/mentions_timeline[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/networkpublic_timeline[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/public_timeline[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/replies[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/retweet[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ '/show[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/show/{id:\d+}[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/update[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ '/update_with_media[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [ R::POST]],
+ '/user_timeline[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ ],
+
+ '/users' => [
+ '/lookup[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/search[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/show[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ '/show/{id:\d+}[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Index::class, [R::GET ]],
+ ],
];
return [
'/.well-known' => [
'/host-meta' => [Module\WellKnown\HostMeta::class, [R::GET]],
'/nodeinfo' => [Module\WellKnown\NodeInfo::class, [R::GET]],
+ '/security.txt' => [Module\WellKnown\SecurityTxt::class, [R::GET]],
'/webfinger' => [Module\Xrd::class, [R::GET]],
'/x-nodeinfo2' => [Module\NodeInfo210::class, [R::GET]],
'/x-social-relay' => [Module\WellKnown\XSocialRelay::class, [R::GET]],
],
'/api' => [
+ '' => $apiRoutes,
+ '/1.1' => $apiRoutes,
'/v1' => [
- '/accounts' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
+ '/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+}/followers' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/accounts/{id:\d+}/following' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/accounts/{id:\d+}/lists' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/accounts/{id:\d+}/identity_proofs' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/accounts/{id:\d+}/follow' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
- '/accounts/{id:\d+}/unfollow' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
- '/accounts/{id:\d+}/block' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
- '/accounts/{id:\d+}/unblock' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
- '/accounts/{id:\d+}/mute' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
- '/accounts/{id:\d+}/unmute' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
- '/accounts/{id:\d+}/pin' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
- '/accounts/{id:\d+}/unpin' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
- '/accounts/{id:\d+}/note' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
- '/accounts/relationships' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/accounts/search' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/accounts/verify_credentials' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/accounts/update_credentials' => [Module\Api\Mastodon\Unimplemented::class, [R::PATCH ]],
- '/admin/accounts' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/admin/accounts/{id:\d+}' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/admin/accounts/{id:\d+}/{action}' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
- '/admin/reports' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/admin/reports/{id:\d+}' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/admin/reports/{id:\d+}/{action}' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
- '/announcements' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/announcements/{id:\d+}/dismiss' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
- '/announcements/{id:\d+}/reactions/{name}' => [Module\Api\Mastodon\Unimplemented::class, [R::PUT, R::DELETE]],
- '/apps' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
- '/apps/verify_credentials' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/blocks' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/bookmarks' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/conversations' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/conversations/{id:\d+}' => [Module\Api\Mastodon\Unimplemented::class, [R::DELETE ]],
- '/conversations/{id:\d+}/read' => [Module\Api\Mastodon\Unimplemented::class, [R::POST ]],
+ '/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 ]],
+ '/accounts/{id:\d+}/identity_proofs' => [Module\Api\Mastodon\Accounts\IdentityProofs::class, [R::GET ]], // Dummy, not supported
+ '/accounts/{id:\d+}/follow' => [Module\Api\Mastodon\Accounts\Follow::class, [ R::POST]],
+ '/accounts/{id:\d+}/unfollow' => [Module\Api\Mastodon\Accounts\Unfollow::class, [ R::POST]],
+ '/accounts/{id:\d+}/block' => [Module\Api\Mastodon\Accounts\Block::class, [ R::POST]],
+ '/accounts/{id:\d+}/unblock' => [Module\Api\Mastodon\Accounts\Unblock::class, [ R::POST]],
+ '/accounts/{id:\d+}/mute' => [Module\Api\Mastodon\Accounts\Mute::class, [ R::POST]],
+ '/accounts/{id:\d+}/unmute' => [Module\Api\Mastodon\Accounts\Unmute::class, [ R::POST]],
+ '/accounts/{id:\d+}/pin' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]], // not supported
+ '/accounts/{id:\d+}/unpin' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]], // not supported
+ '/accounts/{id:\d+}/note' => [Module\Api\Mastodon\Accounts\Note::class, [ R::POST]],
+ '/accounts/relationships' => [Module\Api\Mastodon\Accounts\Relationships::class, [R::GET ]],
+ '/accounts/search' => [Module\Api\Mastodon\Accounts\Search::class, [R::GET ]],
+ '/accounts/update_credentials' => [Module\Api\Mastodon\Accounts\UpdateCredentials::class, [R::PATCH ]],
+ '/accounts/verify_credentials' => [Module\Api\Mastodon\Accounts\VerifyCredentials::class, [R::GET ]],
+ '/accounts/{name}' => [Module\Api\Mastodon\Accounts::class, [R::GET ]],
+ '/admin/accounts' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // not supported
+ '/admin/accounts/{id:\d+}' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // not supported
+ '/admin/accounts/{id:\d+}/{action}' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]], // not supported
+ '/admin/reports' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // not supported
+ '/admin/reports/{id:\d+}' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // not supported
+ '/admin/reports/{id:\d+}/{action}' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]], // not supported
+ '/announcements' => [Module\Api\Mastodon\Announcements::class, [R::GET ]], // Dummy, not supported
+ '/announcements/{id:\d+}/dismiss' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]], // not supported
+ '/announcements/{id:\d+}/reactions/{name}' => [Module\Api\Mastodon\Unimplemented::class, [R::PUT, R::DELETE]], // not supported
+ '/apps' => [Module\Api\Mastodon\Apps::class, [ R::POST]],
+ '/apps/verify_credentials' => [Module\Api\Mastodon\Apps\VerifyCredentials::class, [R::GET ]],
+ '/blocks' => [Module\Api\Mastodon\Blocks::class, [R::GET ]],
+ '/bookmarks' => [Module\Api\Mastodon\Bookmarks::class, [R::GET ]],
+ '/conversations' => [Module\Api\Mastodon\Conversations::class, [R::GET ]],
+ '/conversations/{id:\d+}' => [Module\Api\Mastodon\Conversations::class, [R::DELETE ]],
+ '/conversations/{id:\d+}/read' => [Module\Api\Mastodon\Conversations\Read::class, [R::POST ]],
'/custom_emojis' => [Module\Api\Mastodon\CustomEmojis::class, [R::GET ]],
- '/domain_blocks' => [Module\Api\Mastodon\Unimplemented::class, [R::GET, R::POST, R::DELETE]],
+ '/domain_blocks' => [Module\Api\Mastodon\Unimplemented::class, [R::GET, R::POST, R::DELETE]], // not supported
'/directory' => [Module\Api\Mastodon\Directory::class, [R::GET ]],
- '/endorsements' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/favourites' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/featured_tags' => [Module\Api\Mastodon\Unimplemented::class, [R::GET, R::POST]],
- '/featured_tags/{id:\d+}' => [Module\Api\Mastodon\Unimplemented::class, [R::DELETE ]],
- '/featured_tags/suggestions' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/filters' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/filters/{id:\d+}' => [Module\Api\Mastodon\Unimplemented::class, [R::GET, R::POST, R::PUT, R::DELETE]],
+ '/endorsements' => [Module\Api\Mastodon\Endorsements::class, [R::GET ]], // Dummy, not supported
+ '/favourites' => [Module\Api\Mastodon\Favourited::class, [R::GET ]],
+ '/featured_tags' => [Module\Api\Mastodon\Unimplemented::class, [R::GET, R::POST]], // not supported
+ '/featured_tags/{id:\d+}' => [Module\Api\Mastodon\Unimplemented::class, [R::DELETE ]], // not supported
+ '/featured_tags/suggestions' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // not supported
+ '/filters' => [Module\Api\Mastodon\Filters::class, [R::GET ]], // Dummy, not supported
+ '/filters/{id:\d+}' => [Module\Api\Mastodon\Unimplemented::class, [R::GET, R::POST, R::PUT, R::DELETE]], // not supported
'/follow_requests' => [Module\Api\Mastodon\FollowRequests::class, [R::GET ]],
'/follow_requests/{id:\d+}/{action}' => [Module\Api\Mastodon\FollowRequests::class, [ R::POST]],
'/instance' => [Module\Api\Mastodon\Instance::class, [R::GET ]],
- '/instance/activity' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
+ '/instance/activity' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // @todo
'/instance/peers' => [Module\Api\Mastodon\Instance\Peers::class, [R::GET ]],
- '/lists' => [Module\Api\Mastodon\Unimplemented::class, [R::GET, R::POST]],
- '/lists/{id:\d+}' => [Module\Api\Mastodon\Unimplemented::class, [R::GET, R::PUT, R::DELETE]],
- '/lists/{id:\d+}/accounts' => [Module\Api\Mastodon\Unimplemented::class, [R::GET, R::POST, R::DELETE]],
- '/markers' => [Module\Api\Mastodon\Unimplemented::class, [R::GET, R::POST]],
- '/media' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
- '/media/{id:\d+}' => [Module\Api\Mastodon\Unimplemented::class, [R::GET, R::PUT]],
- '/mutes' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/notifications' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/notifications/{id:\d+}' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/notifications/clear' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
- '/notifications/{id:\d+}/dismiss' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
- '/polls/{id:\d+}' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/polls/{id:\d+}/votes' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
- '/preferences' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/reports' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
- '/scheduled_statuses' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/scheduled_statuses/{id:\d+}' => [Module\Api\Mastodon\Unimplemented::class, [R::GET, R::PUT, R::DELETE]],
- '/statuses' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
- '/statuses/{id:\d+}' => [Module\Api\Mastodon\Unimplemented::class, [R::GET, R::DELETE]],
- '/statuses/{id:\d+}/context' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/statuses/{id:\d+}/reblogged_by' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/statuses/{id:\d+}/favourited_by' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/statuses/{id:\d+}/favourite' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
- '/statuses/{id:\d+}/unfavourite' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
- '/statuses/{id:\d+}/reblog' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
- '/statuses/{id:\d+}/unreblog' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
- '/statuses/{id:\d+}/bookmark' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
- '/statuses/{id:\d+}/unbookmark' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
- '/statuses/{id:\d+}/mute' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
- '/statuses/{id:\d+}/unmute' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
- '/statuses/{id:\d+}/pin' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
- '/statuses/{id:\d+}/unpin' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]],
- '/suggestions' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/suggestions/{id:\d+}' => [Module\Api\Mastodon\Unimplemented::class, [R::DELETE ]],
- '/timelines/home' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- '/timelines/list/{id:\d+}' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
+ '/instance/rules' => [Module\Api\Mastodon\Instance\Rules::class, [R::GET ]], // not supported
+ '/lists' => [Module\Api\Mastodon\Lists::class, [R::GET, R::POST]],
+ '/lists/{id:\d+}' => [Module\Api\Mastodon\Lists::class, [R::GET, R::PUT, R::DELETE]],
+ '/lists/{id:\d+}/accounts' => [Module\Api\Mastodon\Lists\Accounts::class, [R::GET, R::POST, R::DELETE]],
+ '/markers' => [Module\Api\Mastodon\Markers::class, [R::GET, R::POST]], // Dummy, not supported
+ '/media' => [Module\Api\Mastodon\Media::class, [ R::POST]],
+ '/media/{id:\d+}' => [Module\Api\Mastodon\Media::class, [R::GET, R::PUT ]],
+ '/mutes' => [Module\Api\Mastodon\Mutes::class, [R::GET ]],
+ '/notifications' => [Module\Api\Mastodon\Notifications::class, [R::GET ]],
+ '/notifications/{id:\d+}' => [Module\Api\Mastodon\Notifications::class, [R::GET ]],
+ '/notifications/clear' => [Module\Api\Mastodon\Notifications\Clear::class, [ R::POST]],
+ '/notifications/{id:\d+}/dismiss' => [Module\Api\Mastodon\Notifications\Dismiss::class, [ R::POST]],
+ '/polls/{id:\d+}' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // not supported
+ '/polls/{id:\d+}/votes' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]], // not supported
+ '/preferences' => [Module\Api\Mastodon\Preferences::class, [R::GET ]],
+ '/push/subscription' => [Module\Api\Mastodon\PushSubscription::class, [R::GET, R::POST, R::PUT, R::DELETE]],
+ '/reports' => [Module\Api\Mastodon\Unimplemented::class, [ R::POST]], // not supported
+ '/scheduled_statuses' => [Module\Api\Mastodon\ScheduledStatuses::class, [R::GET ]],
+ '/scheduled_statuses/{id:\d+}' => [Module\Api\Mastodon\ScheduledStatuses::class, [R::GET, R::PUT, R::DELETE]],
+ '/statuses' => [Module\Api\Mastodon\Statuses::class, [ R::POST]],
+ '/statuses/{id:\d+}' => [Module\Api\Mastodon\Statuses::class, [R::GET, R::DELETE]],
+ '/statuses/{id:\d+}/card' => [Module\Api\Mastodon\Statuses\Card::class, [R::GET ]],
+ '/statuses/{id:\d+}/context' => [Module\Api\Mastodon\Statuses\Context::class, [R::GET ]],
+ '/statuses/{id:\d+}/reblogged_by' => [Module\Api\Mastodon\Statuses\RebloggedBy::class, [R::GET ]],
+ '/statuses/{id:\d+}/favourited_by' => [Module\Api\Mastodon\Statuses\FavouritedBy::class, [R::GET ]],
+ '/statuses/{id:\d+}/favourite' => [Module\Api\Mastodon\Statuses\Favourite::class, [ R::POST]],
+ '/statuses/{id:\d+}/unfavourite' => [Module\Api\Mastodon\Statuses\Unfavourite::class, [ R::POST]],
+ '/statuses/{id:\d+}/reblog' => [Module\Api\Mastodon\Statuses\Reblog::class, [ R::POST]],
+ '/statuses/{id:\d+}/unreblog' => [Module\Api\Mastodon\Statuses\Unreblog::class, [ R::POST]],
+ '/statuses/{id:\d+}/bookmark' => [Module\Api\Mastodon\Statuses\Bookmark::class, [ R::POST]],
+ '/statuses/{id:\d+}/unbookmark' => [Module\Api\Mastodon\Statuses\Unbookmark::class, [ R::POST]],
+ '/statuses/{id:\d+}/mute' => [Module\Api\Mastodon\Statuses\Mute::class, [ R::POST]],
+ '/statuses/{id:\d+}/unmute' => [Module\Api\Mastodon\Statuses\Unmute::class, [ R::POST]],
+ '/statuses/{id:\d+}/pin' => [Module\Api\Mastodon\Statuses\Pin::class, [ R::POST]],
+ '/statuses/{id:\d+}/unpin' => [Module\Api\Mastodon\Statuses\Unpin::class, [ R::POST]],
+ '/streaming' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
+ '/suggestions' => [Module\Api\Mastodon\Suggestions::class, [R::GET ]],
+ '/suggestions/{id:\d+}' => [Module\Api\Mastodon\Unimplemented::class, [R::DELETE ]], // not implemented
+ '/timelines/direct' => [Module\Api\Mastodon\Timelines\Direct::class, [R::GET ]],
+ '/timelines/home' => [Module\Api\Mastodon\Timelines\Home::class, [R::GET ]],
+ '/timelines/list/{id:\d+}' => [Module\Api\Mastodon\Timelines\ListTimeline::class, [R::GET ]],
'/timelines/public' => [Module\Api\Mastodon\Timelines\PublicTimeline::class, [R::GET ]],
- '/timelines/tag/{hashtag}' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
+ '/timelines/tag/{hashtag}' => [Module\Api\Mastodon\Timelines\Tag::class, [R::GET ]],
'/trends' => [Module\Api\Mastodon\Trends::class, [R::GET ]],
],
- '/v2' => [
- '/search' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
- ],
- '/friendica' => [
- '/profile/show' => [Module\Api\Friendica\Profile\Show::class , [R::GET ]],
- '/events' => [Module\Api\Friendica\Events\Index::class , [R::GET ]],
+ '/v{version:\d+}' => [
+ '/search' => [Module\Api\Mastodon\Search::class, [R::GET ]],
],
- '/followers/ids' => [Module\Api\Twitter\FollowersIds::class , [R::GET ]],
- '/followers/list' => [Module\Api\Twitter\FollowersList::class , [R::GET ]],
- '/friends/ids' => [Module\Api\Twitter\FriendsIds::class , [R::GET ]],
- '/friends/list' => [Module\Api\Twitter\FriendsList::class , [R::GET ]],
- '/oembed' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
+ '/meta' => [Module\Api\Mastodon\Unimplemented::class, [R::POST ]], // not supported
+ '/oembed' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]],
+ '/proofs' => [Module\Api\Mastodon\Proofs::class, [R::GET ]], // Dummy, not supported
],
'/admin' => [
'/addons/{addon}' => [Module\Admin\Addons\Details::class, [R::GET, R::POST]],
- '/blocklist/contact' => [Module\Admin\Blocklist\Contact::class, [R::GET, R::POST]],
- '/blocklist/server' => [Module\Admin\Blocklist\Server::class, [R::GET, R::POST]],
+ '/blocklist/contact' => [Module\Admin\Blocklist\Contact::class, [R::GET, R::POST]],
+ '/blocklist/server' => [Module\Admin\Blocklist\Server\Index::class, [R::GET, R::POST]],
+ '/blocklist/server/add' => [Module\Admin\Blocklist\Server\Add::class, [R::GET, R::POST]],
'/dbsync[/{action}[/{update:\d+}]]' => [Module\Admin\DBSync::class, [R::GET]],
'/site' => [Module\Admin\Site::class, [R::GET, R::POST]],
+ '/storage' => [Module\Admin\Storage::class, [R::GET, R::POST]],
+ '/storage/{name}' => [Module\Admin\Storage::class, [ R::POST]],
+
'/themes' => [Module\Admin\Themes\Index::class, [R::GET, R::POST]],
'/themes/{theme}' => [Module\Admin\Themes\Details::class, [R::GET, R::POST]],
'/themes/{theme}/embed' => [Module\Admin\Themes\Embed::class, [R::GET, R::POST]],
'/{id:\d+}/block' => [Module\Contact::class, [R::GET]],
'/{id:\d+}/conversations' => [Module\Contact::class, [R::GET]],
'/{id:\d+}/contacts[/{type}]' => [Module\Contact\Contacts::class, [R::GET]],
- '/{id:\d+}/drop' => [Module\Contact::class, [R::GET]],
'/{id:\d+}/ignore' => [Module\Contact::class, [R::GET]],
+ '/{id:\d+}/media' => [Module\Contact\Media::class, [R::GET]],
'/{id:\d+}/poke' => [Module\Contact\Poke::class, [R::GET, R::POST]],
'/{id:\d+}/posts' => [Module\Contact::class, [R::GET]],
+ '/{id:\d+}/revoke' => [Module\Contact\Revoke::class, [R::GET, R::POST]],
'/{id:\d+}/update' => [Module\Contact::class, [R::GET]],
'/{id:\d+}/updateprofile' => [Module\Contact::class, [R::GET]],
'/archived' => [Module\Contact::class, [R::GET]],
'/hovercard' => [Module\Contact\Hovercard::class, [R::GET]],
],
- '/credits' => [Module\Credits::class, [R::GET]],
+ '/credits' => [Module\Credits::class, [R::GET]],
+ '/delegation' => [Module\Delegation::class, [R::GET, R::POST]],
+ '/dfrn_notify[/{nickname}]' => [Module\DFRN\Notify::class, [R::POST]],
+ '/dfrn_poll/{nickname}' => [Module\DFRN\Poll::class, [R::GET]],
+ '/dirfind' => [Module\Search\Directory::class, [R::GET]],
+ '/directory' => [Module\Directory::class, [R::GET]],
- '/delegation'=> [Module\Delegation::class, [R::GET, R::POST]],
- '/dirfind' => [Module\Search\Directory::class, [R::GET]],
- '/directory' => [Module\Directory::class, [R::GET]],
+ '/events/json' => [Module\Events\Json::class, [R::GET]],
'/feed' => [
'/{nickname}' => [Module\Feed::class, [R::GET]],
'/status_message/{guid}' => [Module\Diaspora\Fetch::class, [R::GET]],
'/reshare/{guid}' => [Module\Diaspora\Fetch::class, [R::GET]],
],
- '/filed' => [Module\Search\Filed::class, [R::GET]],
- '/filer[/{id:\d+}]' => [Module\Filer\SaveTag::class, [R::GET]],
- '/filerm/{id:\d+}' => [Module\Filer\RemoveTag::class, [R::GET]],
- '/follow_confirm' => [Module\FollowConfirm::class, [R::GET, R::POST]],
- '/followers/{owner}' => [Module\Followers::class, [R::GET]],
- '/following/{owner}' => [Module\Following::class, [R::GET]],
- '/friendica[/json]' => [Module\Friendica::class, [R::GET]],
- '/friendica/inbox' => [Module\Inbox::class, [R::GET, R::POST]],
+ '/filed' => [Module\Search\Filed::class, [R::GET]],
+ '/filer[/{id:\d+}]' => [Module\Filer\SaveTag::class, [R::GET]],
+ '/filerm/{id:\d+}' => [Module\Filer\RemoveTag::class, [R::GET]],
+ '/follow_confirm' => [Module\FollowConfirm::class, [R::GET, R::POST]],
+ '/followers/{nickname}' => [Module\ActivityPub\Followers::class, [R::GET]],
+ '/following/{nickname}' => [Module\ActivityPub\Following::class, [R::GET]],
+ '/friendica[/json]' => [Module\Friendica::class, [R::GET]],
+ '/friendica/inbox' => [Module\ActivityPub\Inbox::class, [R::GET, R::POST]],
'/fsuggest/{contact:\d+}' => [Module\FriendSuggest::class, [R::GET, R::POST]],
'/{group:\d+}/add/{contact:\d+}' => [Module\Group::class, [R::GET, R::POST]],
'/{group:\d+}/remove/{contact:\d+}' => [Module\Group::class, [R::GET, R::POST]],
],
- '/hashtag' => [Module\Hashtag::class, [R::GET]],
- '/help[/{doc:.+}]' => [Module\Help::class, [R::GET]],
- '/home' => [Module\Home::class, [R::GET]],
- '/hcard/{profile}[/{action}]' => [Module\HoverCard::class, [R::GET]],
- '/inbox[/{nickname}]' => [Module\Inbox::class, [R::GET, R::POST]],
- '/invite' => [Module\Invite::class, [R::GET, R::POST]],
+ '/hashtag' => [Module\Hashtag::class, [R::GET]],
+ '/help[/{doc:.+}]' => [Module\Help::class, [R::GET]],
+ '/home' => [Module\Home::class, [R::GET]],
+ '/hcard/{profile}[/{action}]' => [Module\HCard::class, [R::GET]],
+ '/inbox[/{nickname}]' => [Module\ActivityPub\Inbox::class, [R::GET, R::POST]],
+ '/invite' => [Module\Invite::class, [R::GET, R::POST]],
'/install' => [
'[/]' => [Module\Install::class, [R::GET, R::POST]],
'/testrewrite' => [Module\Install::class, [R::GET]],
],
- '/item' => [
- '/ignore/{id}' => [Module\Item\Ignore::class, [R::GET]],
+ '/item/{id:\d+}' => [
+ '/activity/{verb}' => [Module\Item\Activity::class, [ R::POST]],
+ '/follow' => [Module\Item\Follow::class, [ R::POST]],
+ '/ignore' => [Module\Item\Ignore::class, [ R::POST]],
+ '/pin' => [Module\Item\Pin::class, [ R::POST]],
+ '/star' => [Module\Item\Star::class, [ R::POST]],
],
- '/like/{item:\d+}' => [Module\Like::class, [R::GET]],
'/localtime' => [Module\Debug\Localtime::class, [R::GET, R::POST]],
'/login' => [Module\Security\Login::class, [R::GET, R::POST]],
'/logout' => [Module\Security\Logout::class, [R::GET, R::POST]],
'/magic' => [Module\Magic::class, [R::GET]],
- '/maintenance' => [Module\Maintenance::class, [R::GET]],
'/manifest' => [Module\Manifest::class, [R::GET]],
+ '/friendica.webmanifest' => [Module\Manifest::class, [R::GET]],
'/modexp/{nick}' => [Module\PublicRSAKey::class, [R::GET]],
'/newmember' => [Module\Welcome::class, [R::GET]],
'/nodeinfo/1.0' => [Module\NodeInfo110::class, [R::GET]],
'/mark/all' => [Module\Notifications\Notification::class, [R::GET]],
'/{id:\d+}' => [Module\Notifications\Notification::class, [R::GET, R::POST]],
],
- '/oauth/authorize' => [Module\Api\Mastodon\Unimplemented::class, [R::GET]],
- '/oauth/revoke' => [Module\Api\Mastodon\Unimplemented::class, [R::POST]],
- '/oauth/token' => [Module\Api\Mastodon\Unimplemented::class, [R::POST]],
- '/objects/{guid}[/{activity}]' => [Module\Objects::class, [R::GET]],
+
+ '/oauth' => [
+ '/acknowledge' => [Module\OAuth\Acknowledge::class, [R::GET, R::POST]],
+ '/authorize' => [Module\OAuth\Authorize::class, [R::GET]],
+ '/revoke' => [Module\OAuth\Revoke::class, [R::POST]],
+ '/token' => [Module\OAuth\Token::class, [R::POST]],
+ ],
+
+ '/objects/{guid}[/{activity}]' => [Module\ActivityPub\Objects::class, [R::GET]],
'/oembed' => [
'/b2h' => [Module\Oembed::class, [R::GET]],
'/h2b' => [Module\Oembed::class, [R::GET]],
'/{hash}' => [Module\Oembed::class, [R::GET]],
],
- '/outbox/{owner}' => [Module\Outbox::class, [R::GET]],
- '/owa' => [Module\Owa::class, [R::GET]],
- '/openid' => [Module\Security\OpenID::class, [R::GET]],
- '/opensearch' => [Module\OpenSearch::class, [R::GET]],
+ '/outbox/{nickname}' => [Module\ActivityPub\Outbox::class, [R::GET]],
+ '/owa' => [Module\Owa::class, [R::GET]],
+ '/openid' => [Module\Security\OpenID::class, [R::GET]],
+ '/opensearch' => [Module\OpenSearch::class, [R::GET]],
+ '/parseurl' => [Module\ParseUrl::class, [R::GET]],
'/permission/tooltip/{type}/{id:\d+}' => [Module\PermissionTooltip::class, [R::GET]],
'/photo' => [
- '/{name}' => [Module\Photo::class, [R::GET]],
- '/{type}/{name}' => [Module\Photo::class, [R::GET]],
- '/{type}/{customize}/{name}' => [Module\Photo::class, [R::GET]],
+ '/{name}' => [Module\Photo::class, [R::GET]],
+ '/{type}/{id:\d+}' => [Module\Photo::class, [R::GET]],
+ // User Id Fallback, to remove after version 2021.12
+ '/{type}/{uid_ext:\d+\..*}' => [Module\Photo::class, [R::GET]],
+ '/{type}/{nickname_ext}' => [Module\Photo::class, [R::GET]],
+ // Contact Id Fallback, to remove after version 2021.12
+ '/{type:contact|header}/{customsize:\d+}/{contact_id:\d+}' => [Module\Photo::class, [R::GET]],
+ '/{type:contact|header}/{customsize:\d+}/{guid}' => [Module\Photo::class, [R::GET]],
+ '/{type}/{customsize:\d+}/{id:\d+}' => [Module\Photo::class, [R::GET]],
+ // User Id Fallback, to remove after version 2021.12
+ '/{type}/{customsize:\d+}/{uid_ext:\d+\..*}' => [Module\Photo::class, [R::GET]],
+ '/{type}/{customsize:\d+}/{nickname_ext}' => [Module\Photo::class, [R::GET]],
],
- '/pinned/{item:\d+}' => [Module\Pinned::class, [R::GET]],
'/pretheme' => [Module\ThemeDetails::class, [R::GET]],
'/probe' => [Module\Debug\Probe::class, [R::GET]],
- '/proofs' => [Module\Api\Mastodon\Unimplemented::class, [R::GET]],
-
'/profile/{nickname}' => $profileRoutes,
'/u/{nickname}' => $profileRoutes,
'/~{nickname}' => $profileRoutes,
],
'/receive' => [
- '/public' => [Module\Diaspora\Receive::class, [R::POST]],
- '/users/{guid}' => [Module\Diaspora\Receive::class, [R::POST]],
+ '/{type:public}' => [Module\Diaspora\Receive::class, [ R::POST]],
+ '/{type:users}/{guid}' => [Module\Diaspora\Receive::class, [ R::POST]],
],
'/settings' => [
'/rsd.xml' => [Module\ReallySimpleDiscovery::class, [R::GET]],
'/smilies[/json]' => [Module\Smilies::class, [R::GET]],
'/statistics.json' => [Module\Statistics::class, [R::GET]],
- '/starred/{item:\d+}' => [Module\Starred::class, [R::GET]],
'/toggle_mobile' => [Module\ToggleMobile::class, [R::GET]],
'/tos' => [Module\Tos::class, [R::GET]],
'/update_community[/{content}]' => [Module\Update\Community::class, [R::GET]],
- '/update_network' => [Module\Update\Network::class, [R::GET]],
+
+ '/update_network' => [
+ '[/]' => [Module\Update\Network::class, [R::GET]],
+ '/archive/{from:\d\d\d\d-\d\d-\d\d}[/{to:\d\d\d\d-\d\d-\d\d}]' => [Module\Update\Network::class, [R::GET]],
+ '/forum/{contact_id:\d+}' => [Module\Update\Network::class, [R::GET]],
+ '/group/{group_id:\d+}' => [Module\Update\Network::class, [R::GET]],
+ ],
+
'/update_profile' => [Module\Update\Profile::class, [R::GET]],
'/view/theme/{theme}/style.pcss' => [Module\Theme::class, [R::GET]],