Implemented the Authentication endpoints #9
@@ -333,6 +333,34 @@ paths:
|
|||||||
$ref: '#/components/headers/OAuthSecret'
|
$ref: '#/components/headers/OAuthSecret'
|
||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/InternalError'
|
$ref: '#/components/responses/InternalError'
|
||||||
|
/oauth/identity:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Authentication
|
||||||
|
summary: Get information about an authenticated user.
|
||||||
|
description: |
|
||||||
|
Retrieve basic information about the authenticated user.
|
||||||
|
|
||||||
|
This endpoint represents the (optional) [5th step of the OAuth flow process](https://www.discogs.com/developers#header-5-send-authenticated-requests-to-discogs-endpoints), as it is advised to perform a sanity check to ensure the *OAuth* process finished successfully.
|
||||||
|
|
||||||
|
For further details about this process, please refer to the [OAuth flow](https://www.discogs.com/developers#page:authentication,header:authentication-oauth-flow) section in the [Discogs API authentication](https://www.discogs.com/developers#page:authentication) documentation.
|
||||||
|
operationId: getUserIdentity
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successfully retrieved information about an authenticated user.
|
||||||
|
headers:
|
||||||
|
X-Discogs-RateLimit:
|
||||||
|
$ref: '#/components/headers/RateLimit'
|
||||||
|
X-Discogs-RateLimit-Used:
|
||||||
|
$ref: '#/components/headers/RateLimitUsed'
|
||||||
|
X-Discogs-RateLimit-Remaining:
|
||||||
|
$ref: '#/components/headers/RateLimitRemaining'
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/UserIdentity'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/Unauthorized'
|
||||||
/artists/{artist_id}:
|
/artists/{artist_id}:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
@@ -2044,6 +2072,15 @@ components:
|
|||||||
- id
|
- id
|
||||||
- resource_url
|
- resource_url
|
||||||
- username
|
- username
|
||||||
|
UserIdentity:
|
||||||
|
description: A type that represents a user identity.
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/UserId'
|
||||||
|
- type: object
|
||||||
|
properties:
|
||||||
|
consumer_name:
|
||||||
|
description: A name of an application a user utilizes to interacts with the service.
|
||||||
|
type: string
|
||||||
Video:
|
Video:
|
||||||
description: A type that represents a video.
|
description: A type that represents a video.
|
||||||
type: object
|
type: object
|
||||||
|
|||||||
Reference in New Issue
Block a user