pl-api: update features definitions

Signed-off-by: mkljczk <git@mkljczk.pl>
This commit is contained in:
mkljczk
2024-12-20 12:33:54 +01:00
parent 81aebd2d2a
commit 43392015a5
2 changed files with 23 additions and 1 deletions

View File

@ -580,6 +580,8 @@ class PlApiClient {
/**
* Get accounts featured tags
* Tags featured by this account.
*
* Requires features{@link Features['featuredTags']}.
* @see {@link https://docs.joinmastodon.org/methods/accounts/#featured_tags}
*/
getAccountFeaturedTags: async (accountId: string) => {
@ -867,6 +869,8 @@ class PlApiClient {
/**
* View your featured tags
* List all hashtags featured on your profile.
*
* Requires features{@link Features['featuredTags']}.
* @see {@link https://docs.joinmastodon.org/methods/featured_tags/#get}
*/
getFeaturedTags: async () => {
@ -878,6 +882,8 @@ class PlApiClient {
/**
* Feature a tag
* Promote a hashtag on your profile.
*
* Requires features{@link Features['featuredTags']}.
* @see {@link https://docs.joinmastodon.org/methods/featured_tags/#feature}
*/
featureTag: async (name: string) => {
@ -892,6 +898,8 @@ class PlApiClient {
/**
* Unfeature a tag
* Stop promoting a hashtag on your profile.
*
* Requires features{@link Features['featuredTags']}.
* @see {@link https://docs.joinmastodon.org/methods/featured_tags/#unfeature}
*/
unfeatureTag: async (name: string) => {
@ -906,6 +914,8 @@ class PlApiClient {
/**
* View suggested tags to feature
* Shows up to 10 recently-used tags.
*
* Requires features{@link Features['featuredTags']}.
* @see {@link https://docs.joinmastodon.org/methods/featured_tags/#suggestions}
*/
getFeaturedTagsSuggestions: async () => {

View File

@ -402,7 +402,10 @@ const getFeatures = (instance: Instance) => {
/**
* @see POST /api/v1/statuses
*/
createStatusLocalScope: v.software === PLEROMA,
createStatusLocalScope: any([
v.software === ICESHRIMP_NET,
v.software === PLEROMA,
]),
/**
* @see POST /api/v1/statuses
@ -553,6 +556,15 @@ const getFeatures = (instance: Instance) => {
v.software === TAKAHE,
]),
/**
* @see GET /api/v1/accounts/:accountId/featured_tags
* @see GET /api/v1/featured_tags
* @see POST /api/v1/featured_tags
* @see DELETE /api/v1/featured_tags
* @see GET /api/v1/featured_tags/suggestions
*/
featuredTags: v.software === MASTODON,
/** Whether the instance federates. */
federating: federation,