pl-api: support mitra follows export
Signed-off-by: Nicole Mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@ -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
|
||||
*
|
||||
|
||||
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user