feat: adding my show endpoint (#76)

This commit is contained in:
paranarimasu
2023-03-06 22:09:33 -06:00
committed by Maniload
parent 2e11224731
commit a05d0f1d8f
5 changed files with 56 additions and 10 deletions
+1
View File
@@ -155,6 +155,7 @@ export default {
collapsible: true,
items: [
{ text: 'Resource', link: '/auth/user/me/' },
{ text: 'Show', link: '/auth/user/me/show/' },
{ text: 'Playlists', link: '/auth/user/me/playlist/' }
]
},
+1 -1
View File
@@ -12,4 +12,4 @@ Auth API resources pertain to the authorization of actions on the site.
**[User](/auth/user/)**
A user API resource represents an account for the site.
A user API resource represents an AnimeThemes account.
+9 -9
View File
@@ -6,18 +6,18 @@ title: User
---
A user API resource represents an account for the site.
Under construction.
A user API resource represents an AnimeThemes account.
## Fields
Under construction.
| Name | Type | Nullable | Default | Description |
| :--------: | :-----: | :------: | :-----: | :------------------------------------------- |
| id | Integer | No | Yes | The primary key of the resource |
| name | String | No | Yes | The username of the resource |
| created_at | Date | No | No | The date that the resource was created |
| updated_at | Date | No | No | The date that the resource was last modified |
| deleted_at | Date | Yes | No | The date that the resource was deleted |
## Allowed Include Paths
Under construction.
## Endpoints
Under construction.
* playlists
+4
View File
@@ -10,6 +10,10 @@ The "Me" namespace is a collection of endpoints that pertain to the currently au
## Endpoints
**[My Show](/auth/user/me/show/)**
The my show endpoint returns the user resource for the currently authenticated user.
**[My Playlists](/auth/user/me/playlist/)**
The my playlists endpoint returns a listing of playlist resources owned by the currently authenticated user.
+41
View File
@@ -0,0 +1,41 @@
---
title: My Show
---
# My Show Endpoint
The my show endpoint returns the user resource for the currently authenticated user.
## URL
```sh
GET /me/
```
## Authentication
None
## Parameters
None
## Response
```json
{
user: {
id: id,
name: "name",
created_at: "created_at",
updated_at: "updated_at",
deleted_at: "deleted_at"
}
}
```
## Example
```bash
curl -H "Authorization: Bearer {token}" https://api.animethemes.moe/me
```