Implemented the POST /users/{username}/collection/folders/{folder_id}/releases/{release_id} endpoint for the Open API specification document in the library target.
This commit is contained in:
@@ -1337,6 +1337,46 @@ paths:
|
||||
$ref: '#/components/responses/NotFound'
|
||||
'500':
|
||||
$ref: '#/components/responses/InternalError'
|
||||
/users/{username}/collection/folders/{folder_id}/releases/{release_id}:
|
||||
post:
|
||||
tags:
|
||||
- User Collection
|
||||
summary: Add a release to a collection folder of a user.
|
||||
description: |
|
||||
Adds a release to a collection folder of a user.
|
||||
|
||||
> important: A `folder_id` must not be `0`, so it is possible to use the identifier `1` for the *Uncategorized* folder.
|
||||
|
||||
This endpoint requires authentication as the collection owner.
|
||||
operationId: postReleaseToCollectionFolder
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/Username'
|
||||
- $ref: '#/components/parameters/FolderId'
|
||||
- $ref: '#/components/parameters/ReleaseId'
|
||||
security:
|
||||
- ConsumerKeySecret: []
|
||||
- UserToken: []
|
||||
- OAuth: []
|
||||
responses:
|
||||
'201':
|
||||
description: Successfully added a specific release into a collection folder of a 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/ReleaseInstance'
|
||||
'403':
|
||||
$ref: '#/components/responses/NotAccessable'
|
||||
'404':
|
||||
$ref: '#/components/responses/NotFound'
|
||||
'500':
|
||||
$ref: '#/components/responses/InternalError'
|
||||
components:
|
||||
headers:
|
||||
Link:
|
||||
@@ -2329,6 +2369,21 @@ components:
|
||||
- instance_id
|
||||
- date_added
|
||||
- rating
|
||||
ReleaseInstance:
|
||||
description: A type that represents an instace of a release.
|
||||
type: object
|
||||
properties:
|
||||
instance_id:
|
||||
description: An identifier of a release instance.
|
||||
type: integer
|
||||
readOnly: true
|
||||
resource_url:
|
||||
description: A URI resource of a release instance.
|
||||
type: string
|
||||
format: uri
|
||||
required:
|
||||
- instance_id
|
||||
- resource_url
|
||||
ReleaseFormat:
|
||||
description: A type that represents a format of a release.
|
||||
type: object
|
||||
|
||||
Reference in New Issue
Block a user