API: Added trending links

This commit is contained in:
Michael 2022-11-28 20:19:57 +00:00
commit de76e860ad
8 changed files with 74 additions and 8 deletions

View file

@ -665,6 +665,7 @@
"has-categories" => "0",
"has-media" => "EXISTS(SELECT `id` FROM `post-media` WHERE `post-media`.`uri-id` = `post-thread`.`uri-id`)",
"total-comments" => "(SELECT COUNT(*) FROM `post` WHERE `parent-uri-id` = `post-thread`.`uri-id` AND `gravity` = 6)",
"total-actors" => "(SELECT COUNT(DISTINCT(`author-id`)) FROM `post` WHERE `parent-uri-id` = `post-thread`.`uri-id` AND `gravity` = 6)",
"signed_text" => ["diaspora-interaction", "interaction"],
"parent-guid" => ["parent-item-uri", "guid"],
"parent-network" => ["parent-post", "network"],

View file

@ -296,7 +296,7 @@ return [
'/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\Tags::class, [R::GET ]],
'/trends/links' => [Module\Api\Mastodon\Unimplemented::class, [R::GET ]], // not implemented
'/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 ]],
],