diff options
author | Mark Felder <feld@FreeBSD.org> | 2019-06-03 09:12:17 -0500 |
---|---|---|
committer | Mark Felder <feld@FreeBSD.org> | 2019-06-03 09:12:17 -0500 |
commit | f4e2595592ccca6cedd64669baef7bdd2a6547d0 (patch) | |
tree | 6806a79345c7599b0d436df8b6c46e75b54d1292 /docs/api/pleroma_api.md | |
parent | 3c4cab9be18ff543d025177b418ddd0b16050e68 (diff) | |
parent | 9789e000b05621435dc0c03833f564481e0b80e6 (diff) | |
download | pleroma-f4e2595592ccca6cedd64669baef7bdd2a6547d0.tar.gz pleroma-f4e2595592ccca6cedd64669baef7bdd2a6547d0.zip |
Merge branch 'develop' into update-oauth-template
Diffstat (limited to 'docs/api/pleroma_api.md')
-rw-r--r-- | docs/api/pleroma_api.md | 62 |
1 files changed, 48 insertions, 14 deletions
diff --git a/docs/api/pleroma_api.md b/docs/api/pleroma_api.md index 190846de9..edc62727a 100644 --- a/docs/api/pleroma_api.md +++ b/docs/api/pleroma_api.md @@ -61,6 +61,15 @@ Request parameters can be passed via [query strings](https://en.wikipedia.org/wi * Response: JSON. Returns `{"status": "success"}` if the deletion was successful, `{"error": "[error message]"}` otherwise * Example response: `{"error": "Invalid password."}` +## `/api/pleroma/disable_account` +### Disable an account +* Method `POST` +* Authentication: required +* Params: + * `password`: user's password +* Response: JSON. Returns `{"status": "success"}` if the account was successfully disabled, `{"error": "[error message]"}` otherwise +* Example response: `{"error": "Invalid password."}` + ## `/api/account/register` ### Register a new user * Method `POST` @@ -117,20 +126,6 @@ Request parameters can be passed via [query strings](https://en.wikipedia.org/wi ## `/api/pleroma/admin/`… See [Admin-API](Admin-API.md) -## `/api/v1/pleroma/flavour/:flavour` -* Method `POST` -* Authentication: required -* Response: JSON string. Returns the user flavour or the default one on success, otherwise returns `{"error": "error_msg"}` -* Example response: "glitch" -* Note: This is intended to be used only by mastofe - -## `/api/v1/pleroma/flavour` -* Method `GET` -* Authentication: required -* Response: JSON string. Returns the user flavour or the default one. -* Example response: "glitch" -* Note: This is intended to be used only by mastofe - ## `/api/pleroma/notifications/read` ### Mark a single notification as read * Method `POST` @@ -243,6 +238,45 @@ See [Admin-API](Admin-API.md) ] ``` +## `/api/v1/pleroma/mascot` +### Gets user mascot image +* Method `GET` +* Authentication: required + +* Response: JSON. Returns a mastodon media attachment entity. +* Example response: +```json +{ + "id": "abcdefg", + "url": "https://pleroma.example.org/media/abcdefg.png", + "type": "image", + "pleroma": { + "mime_type": "image/png" + } +} +``` + +### Updates user mascot image +* Method `PUT` +* Authentication: required +* Params: + * `image`: Multipart image +* Response: JSON. Returns a mastodon media attachment entity + when successful, otherwise returns HTTP 415 `{"error": "error_msg"}` +* Example response: +```json +{ + "id": "abcdefg", + "url": "https://pleroma.example.org/media/abcdefg.png", + "type": "image", + "pleroma": { + "mime_type": "image/png" + } +} +``` +* Note: Behaves exactly the same as `POST /api/v1/upload`. + Can only accept images - any attempt to upload non-image files will be met with `HTTP 415 Unsupported Media Type`. + ## `/api/pleroma/notification_settings` ### Updates user notification settings * Method `PUT` |