<?php
/**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
use Friendica\Module;
$profileRoutes = [
- '' => [Module\Profile\Index::class, [R::GET]],
- '/contacts/common' => [Module\Profile\Common::class, [R::GET]],
- '/contacts[/{type}]' => [Module\Profile\Contacts::class, [R::GET]],
- '/media' => [Module\Profile\Media::class, [R::GET]],
- '/photos' => [Module\Profile\Photos::class, [R::GET ]],
- '/profile' => [Module\Profile\Profile::class, [R::GET]],
- '/remote_follow' => [Module\Profile\RemoteFollow::class, [R::GET, R::POST]],
- '/schedule' => [Module\Profile\Schedule::class, [R::GET, R::POST]],
- '/status[/{category}[/{date1}[/{date2}]]]' => [Module\Profile\Status::class, [R::GET]],
- '/unkmail' => [Module\Profile\UnkMail::class, [R::GET, R::POST]],
+ '' => [Module\Profile\Index::class, [R::GET]],
+ '/contacts/common' => [Module\Profile\Common::class, [R::GET]],
+ '/contacts[/{type}]' => [Module\Profile\Contacts::class, [R::GET]],
+ '/media' => [Module\Profile\Media::class, [R::GET]],
+ '/photos' => [Module\Profile\Photos::class, [R::GET, R::POST]],
+ '/profile' => [Module\Profile\Profile::class, [R::GET]],
+ '/remote_follow' => [Module\Profile\RemoteFollow::class, [R::GET, R::POST]],
+ '/restricted' => [Module\Profile\Restricted::class, [R::GET ]],
+ '/schedule' => [Module\Profile\Schedule::class, [R::GET, R::POST]],
+ '/conversations[/{category}[/{date1}[/{date2}]]]' => [Module\Profile\Conversations::class, [R::GET]],
+ '/unkmail' => [Module\Profile\UnkMail::class, [R::GET, R::POST]],
];
$apiRoutes = [
'/group_delete[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Group\Delete::class, [ R::POST]],
'/group_update[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Group\Update::class, [ R::POST]],
'/profile/show[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Profile\Show::class, [R::GET ]],
+ '/photoalbums[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Photoalbum\Index::class, [R::GET ]],
+ '/photoalbum[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Photoalbum\Show::class, [R::GET ]],
'/photoalbum/delete[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Photoalbum\Delete::class, [ R::POST]],
'/photoalbum/update[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Photoalbum\Update::class, [ R::POST]],
'/photos/list[.{extension:json|xml|rss|atom}]' => [Module\Api\Friendica\Photo\Lists::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]],
+ '/followed_tags' => [Module\Api\Mastodon\FollowedTags::class, [R::GET ]],
'/instance' => [Module\Api\Mastodon\Instance::class, [R::GET ]],
'/instance/activity' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // @todo
+ '/instance/domain_blocks' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // @todo
+ '/instance/extended_description' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // @todo
'/instance/peers' => [Module\Api\Mastodon\Instance\Peers::class, [R::GET ]],
'/instance/rules' => [Module\Api\Mastodon\Instance\Rules::class, [R::GET ]],
'/lists' => [Module\Api\Mastodon\Lists::class, [R::GET, R::POST]],
'/streaming/user' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // not implemented
'/streaming/user/notification' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // not implemented
'/suggestions/{id:\d+}' => [Module\Api\Mastodon\Unimplemented::class, [R::DELETE ]], // not implemented
+ '/tags/{hashtag}' => [Module\Api\Mastodon\Tags::class, [R::GET ]],
+ '/tags/{hashtag}/follow' => [Module\Api\Mastodon\Tags\Follow::class, [ R::POST]],
+ '/tags/{hashtag}/unfollow' => [Module\Api\Mastodon\Tags\Unfollow::class, [ R::POST]],
'/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\Timelines\Tag::class, [R::GET ]],
- '/trends' => [Module\Api\Mastodon\Trends::class, [R::GET ]],
- '/trends/links' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // not implemented
- '/trends/statuses' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // not implemented
- '/trends/tags' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // not implemented
+ '/trends' => [Module\Api\Mastodon\Trends\Tags::class, [R::GET ]],
+ '/trends/links' => [Module\Api\Mastodon\Trends\Links::class, [R::GET ]],
+ '/trends/statuses' => [Module\Api\Mastodon\Trends\Statuses::class, [R::GET ]],
+ '/trends/tags' => [Module\Api\Mastodon\Trends\Tags::class, [R::GET ]],
+ ],
+ '/v2' => [
+ '/instance' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // not supported
],
'/v{version:\d+}' => [
'/admin/accounts' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // not supported
+ '/filters' => [Module\Api\Mastodon\Filters::class, [R::GET ]], // Dummy, not supported
'/media' => [Module\Api\Mastodon\Media::class, [ R::POST]],
'/search' => [Module\Api\Mastodon\Search::class, [R::GET ]],
'/suggestions' => [Module\Api\Mastodon\Suggestions::class, [R::GET ]],
'/proofs' => [Module\Api\Mastodon\Proofs::class, [R::GET ]], // Dummy, not supported
],
+ '/about[/more]' => [Module\About::class, [R::GET]],
+
'/admin' => [
'[/]' => [Module\Admin\Summary::class, [R::GET]],
'/contact' => [
'[/]' => [Module\Contact::class, [R::GET]],
'/{id:\d+}[/]' => [Module\Contact\Profile::class, [R::GET, R::POST]],
- '/{id:\d+}/{action:block|ignore|update|updateprofile}'
+ '/{id:\d+}/{action:block|ignore|collapse|update|updateprofile}'
=> [Module\Contact\Profile::class, [R::GET]],
'/{id:\d+}/advanced' => [Module\Contact\Advanced::class, [R::GET, R::POST]],
'/{id:\d+}/conversations' => [Module\Contact\Conversations::class, [R::GET]],
'/hidden' => [Module\Contact::class, [R::GET]],
'/hovercard' => [Module\Contact\Hovercard::class, [R::GET]],
'/ignored' => [Module\Contact::class, [R::GET]],
+ '/collapsed' => [Module\Contact::class, [R::GET]],
'/match' => [Module\Contact\MatchInterests::class, [R::GET]],
'/pending' => [Module\Contact::class, [R::GET]],
'/redir/{id:\d+}' => [Module\Contact\Redir::class, [R::GET]],
'/featured/{nickname}' => [Module\ActivityPub\Featured::class, [R::GET]],
- '/feed' => [
- '/{nickname}' => [Module\Feed::class, [R::GET]],
- '/{nickname}/posts' => [Module\Feed::class, [R::GET]],
- '/{nickname}/comments' => [Module\Feed::class, [R::GET]],
- '/{nickname}/replies' => [Module\Feed::class, [R::GET]],
- '/{nickname}/activity' => [Module\Feed::class, [R::GET]],
- ],
+ '/feed/{nickname}[/{type:posts|comments|replies|activity}]' => [Module\Feed::class, [R::GET]],
+
'/feedtest' => [Module\Debug\Feed::class, [R::GET]],
'/fetch' => [
'/permission/tooltip/{type}/{id:\d+}' => [Module\PermissionTooltip::class, [R::GET]],
'/photo' => [
+ '/{size:thumb_small|scaled_full}_{name}' => [Module\Photo::class, [R::GET]],
'/{name}' => [Module\Photo::class, [R::GET]],
'/{type}/{id:\d+}' => [Module\Photo::class, [R::GET]],
'/{type:contact|header}/{guid}' => [Module\Photo::class, [R::GET]],
],
// OStatus stack modules
- '/ostatus/repair' => [Module\OStatus\Repair::class, [R::GET ]],
- '/ostatus/subscribe' => [Module\OStatus\Subscribe::class, [R::GET ]],
- '/poco' => [Module\User\PortableContacts::class, [R::GET ]],
- '/pubsub/{nickname}/{cid:\d+}' => [Module\OStatus\PubSub::class, [R::GET, R::POST]],
- '/pubsubhubbub/{nickname}' => [Module\OStatus\PubSubHubBub::class, [ R::POST]],
- '/salmon/{nickname}' => [Module\OStatus\Salmon::class, [ R::POST]],
+ '/ostatus/repair' => [Module\OStatus\Repair::class, [R::GET ]],
+ '/ostatus/subscribe' => [Module\OStatus\Subscribe::class, [R::GET ]],
+ '/poco' => [Module\User\PortableContacts::class, [R::GET ]],
+ '/pubsub' => [Module\OStatus\PubSub::class, [R::GET, R::POST]],
+ '/pubsub/{nickname}[/{cid:\d+}]' => [Module\OStatus\PubSub::class, [R::GET, R::POST]],
+ '/pubsubhubbub[/{nickname}]' => [Module\OStatus\PubSubHubBub::class, [ R::POST]],
+ '/salmon[/{nickname}]' => [Module\OStatus\Salmon::class, [ R::POST]],
'/search' => [
'[/]' => [Module\Search\Index::class, [R::GET ]],