mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-04 21:08:09 +03:00
add pfp and banner endpoints
This commit is contained in:
@@ -1,70 +0,0 @@
|
||||
# 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
|
||||
|
||||
|
||||
|
||||
@@ -151,3 +151,191 @@ GET /api/v1/users/1/stats
|
||||
!!! info
|
||||
In the event a user has played no games, this will
|
||||
return an empty array.
|
||||
|
||||
*****
|
||||
|
||||
## 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
|
||||
|
||||
*****
|
||||
|
||||
*****
|
||||
|
||||
## Unset your profile picture.
|
||||
|
||||
`DELETE /api/v1/users/:userID/pfp`
|
||||
|
||||
!!! note
|
||||
If you do not have a profile picture set, this is
|
||||
a 404 error.
|
||||
|
||||
### Permissions
|
||||
|
||||
- customise_profile
|
||||
- Must be the owner of this profile.
|
||||
|
||||
### Parameters
|
||||
|
||||
None.
|
||||
### Response
|
||||
|
||||
None.
|
||||
|
||||
### Example
|
||||
|
||||
Self-explanatory.
|
||||
|
||||
*****
|
||||
|
||||
## Change Profile Banner
|
||||
|
||||
`PUT /api/v1/users/:userID/banner`
|
||||
|
||||
### Permissions
|
||||
|
||||
- customise_profile
|
||||
- Must be the owner of this profile.
|
||||
|
||||
### Parameters
|
||||
|
||||
| Property | Type | Description |
|
||||
| :: | :: | :: |
|
||||
| `banner` | JPG, or PNG | The new profile banner 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 banner. |
|
||||
|
||||
### Example
|
||||
|
||||
#### Request
|
||||
```
|
||||
PUT /api/v1/users/1/banner
|
||||
```
|
||||
|
||||
```
|
||||
// this is not a real multipart request, as those things
|
||||
// are huge!
|
||||
banner=<somefiledata>
|
||||
```
|
||||
|
||||
#### Response
|
||||
|
||||
```json
|
||||
{
|
||||
"get": "/api/v1/users/1/banner"
|
||||
}
|
||||
```
|
||||
|
||||
*****
|
||||
|
||||
## Get a user's profile banner.
|
||||
|
||||
`GET /api/v1/users/:userID/banner`
|
||||
|
||||
### Parameters
|
||||
|
||||
None.
|
||||
|
||||
### Response
|
||||
|
||||
Not JSON. This returns the actual JPG or PNG stored for
|
||||
this user.
|
||||
|
||||
### Example
|
||||
|
||||
N/A
|
||||
|
||||
*****
|
||||
|
||||
*****
|
||||
|
||||
## Unset your profile banner.
|
||||
|
||||
`DELETE /api/v1/users/:userID/banner`
|
||||
|
||||
!!! note
|
||||
If you do not have a profile banner set, this is
|
||||
a 404 error.
|
||||
|
||||
### Permissions
|
||||
|
||||
- customise_profile
|
||||
- Must be the owner of this profile.
|
||||
|
||||
### Parameters
|
||||
|
||||
None.
|
||||
### Response
|
||||
|
||||
None.
|
||||
|
||||
### Example
|
||||
|
||||
Self-explanatory.
|
||||
|
||||
Reference in New Issue
Block a user