Implemented the User Collection endpoints #12
@@ -1069,7 +1069,7 @@ paths:
|
|||||||
Retrieves a list of folders in a collection of a user.
|
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.
|
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:
|
parameters:
|
||||||
- $ref: '#/components/parameters/Username'
|
- $ref: '#/components/parameters/Username'
|
||||||
responses:
|
responses:
|
||||||
@@ -1109,7 +1109,7 @@ paths:
|
|||||||
Creates a new folder in the collection of a user.
|
Creates a new folder in the collection of a user.
|
||||||
|
|
||||||
This endpoint requires authentication for the owner.
|
This endpoint requires authentication for the owner.
|
||||||
operationId: postUserCollectionFolders
|
operationId: postCollectionFolders
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/components/parameters/Username'
|
- $ref: '#/components/parameters/Username'
|
||||||
- $ref: '#/components/parameters/Name'
|
- $ref: '#/components/parameters/Name'
|
||||||
@@ -1147,7 +1147,7 @@ paths:
|
|||||||
Retrieves metadata about a collection folder of a user.
|
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.
|
In case the `folder_id` is not 0, then the endpoint requires authentication as the collection owner.
|
||||||
operationId: getUserCollectionFolder
|
operationId: getCollectionFolder
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/components/parameters/Username'
|
- $ref: '#/components/parameters/Username'
|
||||||
- $ref: '#/components/parameters/FolderId'
|
- $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.
|
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.
|
Authentication as the collection owner is required.
|
||||||
operationId: postUserCollectionFolder
|
operationId: postCollectionFolder
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/components/parameters/Username'
|
- $ref: '#/components/parameters/Username'
|
||||||
- $ref: '#/components/parameters/FolderId'
|
- $ref: '#/components/parameters/FolderId'
|
||||||
@@ -1219,7 +1219,7 @@ paths:
|
|||||||
> important: A folder must be empty before it can be deleted.
|
> important: A folder must be empty before it can be deleted.
|
||||||
|
|
||||||
This endpoints requires authentication as the collection owner.
|
This endpoints requires authentication as the collection owner.
|
||||||
operationId: deleteUserCollectionFolder
|
operationId: deleteCollectionFolder
|
||||||
parameters:
|
parameters:
|
||||||
- $ref: '#/components/parameters/Username'
|
- $ref: '#/components/parameters/Username'
|
||||||
- $ref: '#/components/parameters/FolderId'
|
- $ref: '#/components/parameters/FolderId'
|
||||||
@@ -1243,6 +1243,52 @@ paths:
|
|||||||
$ref: '#/components/responses/NotFound'
|
$ref: '#/components/responses/NotFound'
|
||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/InternalError'
|
$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:
|
components:
|
||||||
headers:
|
headers:
|
||||||
Link:
|
Link:
|
||||||
@@ -2184,6 +2230,40 @@ components:
|
|||||||
- styles
|
- styles
|
||||||
- title
|
- title
|
||||||
- uri
|
- 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:
|
ReleaseFormat:
|
||||||
description: A type that represents a format of a release.
|
description: A type that represents a format of a release.
|
||||||
type: object
|
type: object
|
||||||
|
|||||||
Reference in New Issue
Block a user