pl-api: support pixelfed trends

Signed-off-by: mkljczk <git@mkljczk.pl>
This commit is contained in:
mkljczk
2024-12-25 15:28:32 +01:00
parent 4c099dc424
commit efd9f87122
4 changed files with 35 additions and 7 deletions

View File

@ -1254,6 +1254,7 @@ const getFeatures = (instance: Instance) => {
v.software === FRIENDICA,
v.software === ICESHRIMP,
v.software === MASTODON,
v.software === PIXELFED,
instance.api_versions['v2_suggestions.pleroma.pl-api'] >= 1,
]),
@ -1302,8 +1303,15 @@ const getFeatures = (instance: Instance) => {
v.software === FRIENDICA && gte(v.version, '2022.12.0'),
v.software === ICESHRIMP,
v.software === MASTODON,
v.software === PIXELFED,
]),
/**
* Display trends from a given time range.
* @see GET /api/pixelfed/v2/discover/posts/trending
*/
trendingStatusesRange: v.software === PIXELFED,
/**
* Can display trending hashtags.
* @see GET /api/v1/trends
@ -1314,6 +1322,7 @@ const getFeatures = (instance: Instance) => {
v.software === FRIENDICA && gte(v.version, '2022.12.0'),
v.software === ICESHRIMP,
v.software === MASTODON,
v.software === PIXELFED,
]),
/**