From 298911a554d2df14d747bba1f648cb5a7df9af06 Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Thu, 16 Oct 2025 17:18:57 +0200 Subject: [PATCH] Implemented the GET /users/{username}/wants endpoint for the Open API specification document in the library target. --- Sources/DiscogsService/openapi.yaml | 65 +++++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 4 deletions(-) diff --git a/Sources/DiscogsService/openapi.yaml b/Sources/DiscogsService/openapi.yaml index da5751aee..28395f5a3 100644 --- a/Sources/DiscogsService/openapi.yaml +++ b/Sources/DiscogsService/openapi.yaml @@ -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: ; rel="next", ; 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: