[feature] Implement profile API (#2926)

* Implement profile API

This Mastodon 4.2 extension provides capabilities missing from the existing Mastodon account update API: deleting an account's avatar or header.

See: https://docs.joinmastodon.org/methods/profile/

* Move profile media methods to media processor

* Remove check for moved account
This commit is contained in:
Vyr Cossont
2024-05-29 03:57:44 -07:00
committed by GitHub
parent f9a4a6120d
commit 975e92b7f1
6 changed files with 405 additions and 1 deletions

View File

@@ -7276,6 +7276,60 @@ paths:
summary: Return an object of user preferences.
tags:
- preferences
/api/v1/profile/avatar:
delete:
description: If the account doesn't have an avatar, the call succeeds anyway.
operationId: accountAvatarDelete
produces:
- application/json
responses:
"200":
description: The updated account, including profile source information.
schema:
$ref: '#/definitions/account'
"400":
description: bad request
"401":
description: unauthorized
"403":
description: forbidden
"406":
description: not acceptable
"500":
description: internal server error
security:
- OAuth2 Bearer:
- admin
summary: Delete the authenticated account's avatar.
tags:
- accounts
/api/v1/profile/header:
delete:
description: If the account doesn't have a header, the call succeeds anyway.
operationId: accountHeaderDelete
produces:
- application/json
responses:
"200":
description: The updated account, including profile source information.
schema:
$ref: '#/definitions/account'
"400":
description: bad request
"401":
description: unauthorized
"403":
description: forbidden
"406":
description: not acceptable
"500":
description: internal server error
security:
- OAuth2 Bearer:
- admin
summary: Delete the authenticated account's header.
tags:
- accounts
/api/v1/reports:
get:
description: |-