mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 10:12:26 -05:00
[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.
This commit is contained in:
parent
9b4b4d4eb8
commit
6d138588d8
8 changed files with 315 additions and 2 deletions
|
|
@ -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: |-
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue