diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js index a766688..5446e6e 100644 --- a/docs/.vitepress/config.js +++ b/docs/.vitepress/config.js @@ -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/' } ] }, diff --git a/docs/auth/index.md b/docs/auth/index.md index 9e5125f..d63160c 100644 --- a/docs/auth/index.md +++ b/docs/auth/index.md @@ -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. \ No newline at end of file +A user API resource represents an AnimeThemes account. \ No newline at end of file diff --git a/docs/auth/user/index.md b/docs/auth/user/index.md index 94fcbb3..ada39a8 100644 --- a/docs/auth/user/index.md +++ b/docs/auth/user/index.md @@ -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. \ No newline at end of file +* playlists \ No newline at end of file diff --git a/docs/auth/user/me/index.md b/docs/auth/user/me/index.md index 5683535..1736918 100644 --- a/docs/auth/user/me/index.md +++ b/docs/auth/user/me/index.md @@ -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. \ No newline at end of file diff --git a/docs/auth/user/me/show/index.md b/docs/auth/user/me/show/index.md new file mode 100644 index 0000000..1ec4ed4 --- /dev/null +++ b/docs/auth/user/me/show/index.md @@ -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 +``` \ No newline at end of file