mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-11 00:38:28 +03:00
document me
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
# Individual User Endpoints
|
||||
|
||||
*****
|
||||
|
||||
## Change Profile Picture
|
||||
|
||||
`PUT /api/v1/users/:userID/pfp`
|
||||
|
||||
### Permissions
|
||||
|
||||
- customise_profile
|
||||
- Must be the owner of this profile.
|
||||
|
||||
### Parameters
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `pfp` | JPG, or PNG | The new profile picture to set. |
|
||||
|
||||
!!! note
|
||||
This endpoint expects multipart form data.
|
||||
|
||||
### Response
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `get` | String | This contains the URL to then GET the new profile picture. |
|
||||
|
||||
### Example
|
||||
|
||||
#### Request
|
||||
```
|
||||
PUT /api/v1/users/1/pfp
|
||||
```
|
||||
|
||||
```
|
||||
// this is not a real multipart request, as those things
|
||||
// are huge!
|
||||
pfp=<somefiledata>
|
||||
```
|
||||
|
||||
#### Response
|
||||
|
||||
```json
|
||||
{
|
||||
"get": "/api/v1/users/1/pfp"
|
||||
}
|
||||
```
|
||||
|
||||
*****
|
||||
|
||||
## Get a user's profile picture.
|
||||
|
||||
`GET /api/v1/users/:userID/pfp`
|
||||
|
||||
### Parameters
|
||||
|
||||
None.
|
||||
|
||||
### Response
|
||||
|
||||
Not JSON. This returns the actual JPG or PNG stored for
|
||||
this user.
|
||||
|
||||
### Example
|
||||
|
||||
N/A
|
||||
|
||||
|
||||
|
||||
@@ -51,6 +51,17 @@ GET /api/v1/users
|
||||
| :: | :: | :: |
|
||||
| `:userID` | URL Parameter | The user's userID or their username. |
|
||||
|
||||
!!! note
|
||||
The :userID param has some special functionality,
|
||||
and any time you see it in these docs, that
|
||||
functionality is supported.
|
||||
|
||||
You may pass the integer userID for this user - 1.
|
||||
You may also pass the username - zkldi.
|
||||
You may also pass the special string - `me` - which
|
||||
will select whatever user this authentication token
|
||||
is for.
|
||||
|
||||
### Response
|
||||
|
||||
| Property | Type | Description |
|
||||
@@ -70,6 +81,8 @@ GET /api/v1/users
|
||||
GET /api/v1/users/zkldi
|
||||
OR
|
||||
GET /api/v1/users/1
|
||||
OR
|
||||
GET /api/v1/users/me WHEN authenticated as userID 1.
|
||||
```
|
||||
|
||||
#### Response
|
||||
|
||||
Reference in New Issue
Block a user