pl-api: support mitra follows export

Signed-off-by: Nicole Mikołajczyk <git@mkljczk.pl>
This commit is contained in:
Nicole Mikołajczyk
2025-04-08 18:02:48 +02:00
parent 00699e7b37
commit 5f8859a950
2 changed files with 38 additions and 0 deletions

View File

@ -1637,6 +1637,32 @@ class PlApiClient {
return response.json;
},
/**
* Export followers to CSV file
*
* Requires features{@link Features['exportFollowers']}.
*/
exportFollowers: async () => {
const response = await this.request('/api/v1/settings/export_followers', {
method: 'GET',
});
return response.data;
},
/**
* Export follows to CSV file
*
* Requires features{@link Features['exportFollows']}.
*/
exportFollows: async () => {
const response = await this.request('/api/v1/settings/export_follows', {
method: 'GET',
});
return response.data;
}
/**
* Updates user notification settings
*

View File

@ -621,6 +621,18 @@ const getFeatures = (instance: Instance) => {
/** Whether to allow exporting follows/blocks/mutes to CSV by paginating the API. */
exportData: true,
/**
* Export followers to CSV file
* @see GET /api/v1/settings/export_followers
*/
exportFollowers: v.software === MITRA && gte(v.version, '1.27.0'),
/**
* Export follows to CSV file
* @see GET /api/v1/settings/export_follows
*/
exportFollows: v.software === MITRA && gte(v.version, '1.27.0'),
/** Whether the accounts who favourited or emoji-reacted to a status can be viewed through the API. */
exposableReactions: any([
v.software === FIREFISH,