summaryrefslogtreecommitdiff
path: root/docs/api
diff options
context:
space:
mode:
authorLibravatar Daenney <daenney@users.noreply.github.com>2023-05-06 17:42:58 +0200
committerLibravatar GitHub <noreply@github.com>2023-05-06 17:42:58 +0200
commit6d138588d8fc450121a3230612e8cf2d9b4e9908 (patch)
tree5c0885badc38facd90ec5e532e67795f5b39e945 /docs/api
parent[chore] update readthedocs deps, use conda (#1742) (diff)
downloadgotosocial-6d138588d8fc450121a3230612e8cf2d9b4e9908.tar.xz
[feature] Implement the preferences client API (#1740)
This adds the preferences endpoint to our Mastodon Client API implementation. It's a read-only endpoint that returns a number of user preferences. Applications can query these settings when logging in a user (for the first time) to configure themselves.
Diffstat (limited to 'docs/api')
-rw-r--r--docs/api/swagger.yaml41
1 files changed, 41 insertions, 0 deletions
diff --git a/docs/api/swagger.yaml b/docs/api/swagger.yaml
index 25527439d..ddb31bc68 100644
--- a/docs/api/swagger.yaml
+++ b/docs/api/swagger.yaml
@@ -4651,6 +4651,47 @@ paths:
summary: Clear/delete all notifications for currently authorized user.
tags:
- notifications
+ /api/v1/preferences:
+ get:
+ description: |-
+ Example:
+
+ ```
+
+ {
+ "posting:default:visibility": "public",
+ "posting:default:sensitive": false,
+ "posting:default:language": "en",
+ "reading:expand:media": "default",
+ "reading:expand:spoilers": false,
+ "reading:autoplay:gifs": false
+ }
+
+ ````
+ operationId: preferencesGet
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: ""
+ schema:
+ type: object
+ "400":
+ description: bad request
+ "401":
+ description: unauthorized
+ "404":
+ description: not found
+ "406":
+ description: not acceptable
+ "500":
+ description: internal server error
+ security:
+ - OAuth2 Bearer:
+ - read:accounts
+ summary: Return an object of user preferences.
+ tags:
+ - preferences
/api/v1/reports:
get:
description: |-