diff --git a/Sources/DiscogsService/openapi.yaml b/Sources/DiscogsService/openapi.yaml index 5a2fa7b84..064a24a17 100644 --- a/Sources/DiscogsService/openapi.yaml +++ b/Sources/DiscogsService/openapi.yaml @@ -1069,7 +1069,7 @@ paths: Retrieves a list of folders in a collection of a user. In case the collection has been made private by its owner, authentication as the collection owner is required. Otherwise, only folder `ID 0`` (the “All” folder) will be visible only if the requested collection of a user is public. - operationId: getUserCollectionFolders + operationId: getCollectionFolders parameters: - $ref: '#/components/parameters/Username' responses: @@ -1109,7 +1109,7 @@ paths: Creates a new folder in the collection of a user. This endpoint requires authentication for the owner. - operationId: postUserCollectionFolders + operationId: postCollectionFolders parameters: - $ref: '#/components/parameters/Username' - $ref: '#/components/parameters/Name' @@ -1147,7 +1147,7 @@ paths: Retrieves metadata about a collection folder of a user. In case the `folder_id` is not 0, then the endpoint requires authentication as the collection owner. - operationId: getUserCollectionFolder + operationId: getCollectionFolder parameters: - $ref: '#/components/parameters/Username' - $ref: '#/components/parameters/FolderId' @@ -1179,7 +1179,7 @@ paths: Edits the metadata for a collection folder of a user. Please bear in mind that the folders with identifier `0` and `1` cannot be renamed. Authentication as the collection owner is required. - operationId: postUserCollectionFolder + operationId: postCollectionFolder parameters: - $ref: '#/components/parameters/Username' - $ref: '#/components/parameters/FolderId' @@ -1219,7 +1219,7 @@ paths: > important: A folder must be empty before it can be deleted. This endpoints requires authentication as the collection owner. - operationId: deleteUserCollectionFolder + operationId: deleteCollectionFolder parameters: - $ref: '#/components/parameters/Username' - $ref: '#/components/parameters/FolderId' @@ -1243,6 +1243,52 @@ paths: $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalError' + /users/{username}/collection/releases/{release_id}: + get: + tags: + - User Collection + summary: Get information about collection folders of a user that contains a given release. + description: | + 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`. + + This endpoint requires authentication as the collection owner only in case the collection is private. + operationId: getCollectionRelease + parameters: + - $ref: '#/components/parameters/Username' + - $ref: '#/components/parameters/ReleaseId' + responses: + '200': + description: Successfully retrieved a specific collection folder of a + 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' components: headers: Link: @@ -2184,6 +2230,40 @@ components: - styles - title - uri + ReleaseInFolder: + description: A type that represents an appearance of a release in a collection folder of a user. + type: object + properties: + id: + description: An identifier of an appearance of a release in a collection folder. + type: integer + readOnly: true + folder_id: + description: An identifier of a collection folder that contains a specified release. + type: integer + readOnly: true + instance_id: + description: An identifier of a release instance. + type: integer + readOnly: true + date_added: + description: A date and time in which a release was added into the collection folder of a user. + type: string + format: date-time + rating: + description: A rating given to a release by a user that added it into a collection folder. + type: integer + minimum: 0 + maximum: 5 + basic_information: + description: The available information about a release that was added into a collection folder of a user. + $ref: '#/components/schemas/Release' + required: + - basic_information + - id + - instance_id + - date_added + - rating ReleaseFormat: description: A type that represents a format of a release. type: object