Implemented the GET /users/{username}/wants endpoint for the Open API specification document in the library target.

This commit is contained in:
2025-10-16 17:18:57 +02:00
parent 2a7b9746a7
commit 298911a554
+61 -4
View File
@@ -1568,6 +1568,60 @@ paths:
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalError'
/users/{username}/wants:
get:
tags:
- User Wantlist
summary: Get a list of releases in a wantlist of a user.
description: |
Returnss the list of releases in a wantlist of a user. Accepts Pagination parameters.
Basic information about each release is provided, suitable for display in a list. For detailed information, make another API call to fetch the corresponding release.
If the wantlist has been made private by its owner, you must be authenticated as the owner to view it.
The notes field will be visible if you are authenticated as the wantlist owner.
operationId: getWantlist
parameters:
- $ref: '#/components/parameters/Username'
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/PerPage'
responses:
'200':
description: Successfully retrieved a list of releases in a wantlist of a user.
headers:
Link:
$ref: '#/components/headers/Link'
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:
description: A type that contains a list of releases in a wantlist.
type: object
properties:
pagination:
$ref: '#/components/schemas/Pagination'
wants:
description: A list of releases in a wantlist.
type: array
items:
$ref: '#/components/schemas/ReleaseInFolder'
required:
- pagination
- wants
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/NotAccessable'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalError'
components:
headers:
Link:
@@ -1578,7 +1632,6 @@ components:
schema:
type: string
example: <https://api.discogs.com/artists/1/releases?page=2&per_page=75>; rel="next", <https://api.discogs.com/artists/1/releases?page=30&per_page=75>; rel="last"
required: true
OAuthCallback:
description: An OAuth callback confirmed.
schema:
@@ -2610,13 +2663,18 @@ components:
type: integer
readOnly: true
folder_id:
description: An identifier of a collection folder that contains a specified release.
description: An identifier of a collection folder that contains a specified release, if any.
type: integer
readOnly: true
instance_id:
description: An identifier of a release instance.
description: An identifier of a release instance, if any.
type: integer
readOnly: true
resource_url:
description: A URI resource to a release, if any.
type: string
format: uri
readOnly: true
date_added:
description: A date and time in which a release was added into the collection folder of a user.
type: string
@@ -2649,7 +2707,6 @@ components:
required:
- basic_information
- id
- instance_id
- date_added
- rating
ReleaseInstance: