pl-api: allow displaying subscribers list
Signed-off-by: Nicole Mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@@ -108,6 +108,7 @@ import type {
|
||||
GetAccountFollowingParams,
|
||||
GetAccountParams,
|
||||
GetAccountStatusesParams,
|
||||
GetAccountSubscribersParams,
|
||||
GetRelationshipsParams,
|
||||
GetScrobblesParams,
|
||||
ReportAccountParams,
|
||||
@@ -594,6 +595,14 @@ class PlApiClient {
|
||||
getAccountFollowing: async (accountId: string, params?: GetAccountFollowingParams) =>
|
||||
this.#paginatedGet(`/api/v1/accounts/${accountId}/following`, { params }, accountSchema),
|
||||
|
||||
/**
|
||||
* Subscriptions to the given user.
|
||||
*
|
||||
* Requires features{@link Features['subscriptions']}.
|
||||
*/
|
||||
getAccountSubscribers: async (accountId: string, params?: GetAccountSubscribersParams) =>
|
||||
this.#paginatedGet(`/api/v1/accounts/${accountId}/subscribers`, { params }, accountSchema),
|
||||
|
||||
/**
|
||||
* Get account’s featured tags
|
||||
* Tags featured by this account.
|
||||
|
||||
@@ -1475,6 +1475,18 @@ const getFeatures = (instance: Instance) => {
|
||||
*/
|
||||
statusDislikes: v.software === FRIENDICA && gte(v.version, '2023.3.0'),
|
||||
|
||||
/**
|
||||
* @see GET /api/v1/accounts/:id/subscribers
|
||||
* @see POST /api/v1/subscriptions
|
||||
* @see GET /api/v1/subscriptions/options
|
||||
* @see POST /api/v1/subscriptions/options
|
||||
* @see GET /api/v1/subscriptions/find
|
||||
* @see POST /api/v1/subscriptions/invoices
|
||||
* @see GET /api/v1/subscriptions/invoices/:id
|
||||
* @see DELETE /api/v1/subscriptions/invoices/:id
|
||||
*/
|
||||
subscriptions: v.software === MITRA,
|
||||
|
||||
/**
|
||||
* Can display suggested accounts.
|
||||
* @see {@link https://docs.joinmastodon.org/methods/suggestions/}
|
||||
|
||||
@@ -27,6 +27,14 @@ type GetAccountFollowersParams = PaginationParams & WithRelationshipsParam;
|
||||
*/
|
||||
type GetAccountFollowingParams = PaginationParams & WithRelationshipsParam;
|
||||
|
||||
/**
|
||||
* @category Request params
|
||||
*/
|
||||
interface GetAccountSubscribersParams extends PaginationParams, WithRelationshipsParam {
|
||||
/** Include expired subscriptions. */
|
||||
include_expired?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* @category Request params
|
||||
*/
|
||||
@@ -111,6 +119,7 @@ export type {
|
||||
GetAccountStatusesParams,
|
||||
GetAccountFollowersParams,
|
||||
GetAccountFollowingParams,
|
||||
GetAccountSubscribersParams,
|
||||
FollowAccountParams,
|
||||
GetRelationshipsParams,
|
||||
SearchAccountParams,
|
||||
|
||||
@@ -1436,10 +1436,10 @@
|
||||
"security.qr.fail": "Failed to fetch setup key",
|
||||
"security.submit": "Save changes",
|
||||
"security.submit.delete": "Delete account",
|
||||
"security.text.delete": "To delete your account, enter your password and then click Delete account. This is a permanent action that cannot be undone. Your account will be destroyed from this server, and a deletion request will be sent to other servers. It's not guaranteed that all servers will purge your account.",
|
||||
"security.text.delete": "To delete your account, enter your password and then click Delete account. This is a permanent action that cannot be undone. Your account will be destroyed from this server, and a deletion request will be sent to other servers. It’s not guaranteed that all servers will purge your account.",
|
||||
"security.text.delete.local": "To delete your account, enter your password and then click Delete account. This is a permanent action that cannot be undone.",
|
||||
"security.text.delete.local.without_password": "To delete your account, click Delete account. This is a permanent action that cannot be undone.",
|
||||
"security.text.delete.without_password": "To delete your account, click Delete account. This is a permanent action that cannot be undone. Your account will be destroyed from this server, and a deletion request will be sent to other servers. It's not guaranteed that all servers will purge your account.",
|
||||
"security.text.delete.without_password": "To delete your account, click Delete account. This is a permanent action that cannot be undone. Your account will be destroyed from this server, and a deletion request will be sent to other servers. It’s not guaranteed that all servers will purge your account.",
|
||||
"security.tokens.created_at": "Created on {date}",
|
||||
"security.tokens.last_used": "Last used on {date}",
|
||||
"security.tokens.revoke": "Revoke",
|
||||
|
||||
Reference in New Issue
Block a user