Implemented the GET /users/{username}/collection/folders/{folder_id}/releases endpoint for the Open API specification document in the library target.

This commit is contained in:
2025-10-16 02:08:22 +02:00
parent 9244d3adf4
commit 194dd035d1
+68 -3
View File
@@ -1247,17 +1247,65 @@ paths:
get: get:
tags: tags:
- User Collection - User Collection
summary: Get information about collection folders of a user that contains a given release. summary: Get collection items of a user that contains a given release.
description: | description: |
Views those collection folder of a user which contain a specified release. This will also show information about each release instance. Views those collection folder of a user which contain a specified release. This will also show information about each release instance.
> important: A given `release_id` must not be `0`. > important: A given `release_id` must not be `0`.
This endpoint requires authentication as the collection owner only in case the collection is private. This endpoint requires authentication as the collection owner only in case the collection is private.
operationId: getCollectionRelease operationId: getCollectionItemsByRelease
parameters: parameters:
- $ref: '#/components/parameters/Username' - $ref: '#/components/parameters/Username'
- $ref: '#/components/parameters/ReleaseId' - $ref: '#/components/parameters/ReleaseId'
responses:
'200':
description: Successfully retrieved a list of collection items that contains a specified release.
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:
type: object
properties:
pagination:
$ref: '#/components/schemas/Pagination'
releases:
description: A list of collection folders of a user that contains a specified release.
type: array
items:
$ref: '#/components/schemas/ReleaseInFolder'
required:
- pagination
- releases
'403':
$ref: '#/components/responses/NotAccessable'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalError'
/users/{username}/collection/folders/{folder_id}/releases:
get:
tags:
- User Collection
summary: Get collection items of a user inside a specified folder.
description: |
Returns the list of item in a specified collection folder of a user.
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.
This endpoint provides pagination parameters and also, requires authentication as an owner of a collection only in case the `folder_id` is not `0`, or the collection has been made private by its owner. Otherwise, only public notes fields will be visible.
operationId: getCollectionItemsByFolder
parameters:
- $ref: '#/components/parameters/Username'
- $ref: '#/components/parameters/FolderId'
- $ref: '#/components/parameters/SortField'
- $ref: '#/components/parameters/SortOrder'
responses: responses:
'200': '200':
description: Successfully retrieved a specific collection folder of a description: Successfully retrieved a specific collection folder of a
@@ -1276,7 +1324,7 @@ paths:
pagination: pagination:
$ref: '#/components/schemas/Pagination' $ref: '#/components/schemas/Pagination'
releases: releases:
description: A list of collection folders of a user that contains a specified release. description: A list of collection folders of a user that contains a
type: array type: array
items: items:
$ref: '#/components/schemas/ReleaseInFolder' $ref: '#/components/schemas/ReleaseInFolder'
@@ -2258,6 +2306,23 @@ components:
basic_information: basic_information:
description: The available information about a release that was added into a collection folder of a user. description: The available information about a release that was added into a collection folder of a user.
$ref: '#/components/schemas/Release' $ref: '#/components/schemas/Release'
notes:
description: A list of additional notes related to a release in a collection folder of a user.
type: array
items:
description: A type that represents a note about a release in a collection folder of a user.
type: object
properties:
field_id:
description: An identifier of a custom field.
type: integer
readOnly: true
value:
description: A value assigned to a custom field.
type: string
required:
- field_id
- value
required: required:
- basic_information - basic_information
- id - id