Skip to content

Commit 13e0490

Browse files
committed
feat: /users/@me
1 parent 7eb5599 commit 13e0490

File tree

1 file changed

+44
-1
lines changed

1 file changed

+44
-1
lines changed

auth.yaml renamed to ddocs-api.yaml

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,51 @@ paths:
6767
in: header
6868
name: Cookie
6969
description: The provided r_ cookie to refresh with
70+
/users/@me:
71+
get:
72+
summary: Get current user
73+
tags: []
74+
responses:
75+
'200':
76+
description: OK
77+
content:
78+
application/json:
79+
schema:
80+
$ref: '#/components/schemas/User'
81+
examples:
82+
example-1:
83+
value:
84+
id: '259053800755691520'
85+
username: quin
86+
discriminator: '3017'
87+
avatar: 'https://cdn.discordapp.com/avatars/259053800755691520/1b1a1c1a62756406ebb3319138e08d4b.png?size=128'
88+
isAuthor: true
89+
'401':
90+
description: 'Unauthorized: refresh your token'
91+
'403':
92+
description: 'Forbidden: The discord oauth is no longer valid, please sign in again.'
93+
'404':
94+
description: The user was not found? treat as 403
95+
operationId: get-users-@me
96+
description: Gets the current user
97+
security:
98+
- JWT: []
7099
components:
71-
schemas: {}
100+
schemas:
101+
User:
102+
title: User
103+
type: object
104+
properties:
105+
id:
106+
type: string
107+
username:
108+
type: string
109+
discriminator:
110+
type: string
111+
avatar:
112+
type: string
113+
isAuthor:
114+
type: boolean
72115
securitySchemes:
73116
JWT:
74117
type: http

0 commit comments

Comments
 (0)