Implemented the GET /marketplace/listings/{listing_id} endpoint for the Open API specification document in the library target.
This commit is contained in:
@@ -1872,6 +1872,35 @@ paths:
|
|||||||
$ref: '#/components/responses/Unprocessable'
|
$ref: '#/components/responses/Unprocessable'
|
||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/InternalError'
|
$ref: '#/components/responses/InternalError'
|
||||||
|
/marketplace/listings/{listing_id}:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- Marketplace
|
||||||
|
summary: Get information about a listing in the marketplace.
|
||||||
|
description: |
|
||||||
|
Views the data associated with a listing in the marketplace.
|
||||||
|
|
||||||
|
In case of authenticated as an inventory owner, items that not only have the `For Sale` state will be shown as well as other extra fields in those items such as `weight`, `format_quality`, `external_id`, `location`, and `quantity_keys`. Note that the `quantity` field is read-only for *NearMint* users, who will see *1* for all quantity values, regardless of their actual count.
|
||||||
|
|
||||||
|
In case the user is authorized, the listing will contain a `in_cart` boolean field indicating whether or not this listing is in their cart.
|
||||||
|
operationId: getListing
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/ListingId'
|
||||||
|
- $ref: '#/components/parameters/Currency'
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successfully retrieved a listing in a marketplace.
|
||||||
|
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/Listing'
|
||||||
'404':
|
'404':
|
||||||
$ref: '#/components/responses/NotFound'
|
$ref: '#/components/responses/NotFound'
|
||||||
'422':
|
'422':
|
||||||
@@ -2062,6 +2091,15 @@ components:
|
|||||||
type: integer
|
type: integer
|
||||||
minimum: 0
|
minimum: 0
|
||||||
example: 123
|
example: 123
|
||||||
|
ListingId:
|
||||||
|
description: An identifier of a listing.
|
||||||
|
name: listing_id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
minimum: 0
|
||||||
|
example: 172723812
|
||||||
Location:
|
Location:
|
||||||
description: A geographical location of a user.
|
description: A geographical location of a user.
|
||||||
name: location
|
name: location
|
||||||
@@ -2470,9 +2508,6 @@ components:
|
|||||||
status:
|
status:
|
||||||
description: An explanation for the stat status of a community.
|
description: An explanation for the stat status of a community.
|
||||||
type: string
|
type: string
|
||||||
required:
|
|
||||||
- have
|
|
||||||
- want
|
|
||||||
ConditionMedia:
|
ConditionMedia:
|
||||||
description: A type that represents a media condition.
|
description: A type that represents a media condition.
|
||||||
type: string
|
type: string
|
||||||
@@ -2503,6 +2538,8 @@ components:
|
|||||||
Currency:
|
Currency:
|
||||||
description: A list of currency codes defined in the marketplace.
|
description: A list of currency codes defined in the marketplace.
|
||||||
type: string
|
type: string
|
||||||
|
minLength: 3
|
||||||
|
maxLength: 3
|
||||||
enum:
|
enum:
|
||||||
- USD
|
- USD
|
||||||
- GBP
|
- GBP
|
||||||
@@ -2933,9 +2970,21 @@ components:
|
|||||||
price:
|
price:
|
||||||
description: A price assigned to a listing.
|
description: A price assigned to a listing.
|
||||||
$ref: '#/components/schemas/Price'
|
$ref: '#/components/schemas/Price'
|
||||||
|
original_price:
|
||||||
|
description: An original price assigned to a listing.
|
||||||
|
$ref: '#/components/schemas/PriceFormatted'
|
||||||
|
shipping_price:
|
||||||
|
description: A shipping price assigned to a listing.
|
||||||
|
$ref: '#/components/schemas/Price'
|
||||||
|
original_shipping_price:
|
||||||
|
description: An original shipping price assigned to a listing.
|
||||||
|
$ref: '#/components/schemas/PriceFormatted'
|
||||||
allow_offers:
|
allow_offers:
|
||||||
description: A flag that indicates whether a listing allow to receive offers or not.
|
description: A flag that indicates whether a listing allow to receive offers or not.
|
||||||
type: boolean
|
type: boolean
|
||||||
|
offer_submitted:
|
||||||
|
description: A flag that indicates whether a user submitted an offer for a listing.
|
||||||
|
type: boolean
|
||||||
condition:
|
condition:
|
||||||
description: A media condition of a listing.
|
description: A media condition of a listing.
|
||||||
$ref: '#/components/schemas/ConditionMedia'
|
$ref: '#/components/schemas/ConditionMedia'
|
||||||
@@ -2954,7 +3003,7 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
seller:
|
seller:
|
||||||
description: A seller of a listing.
|
description: A seller of a listing.
|
||||||
$ref: '#/components/schemas/UserId'
|
$ref: '#/components/schemas/Seller'
|
||||||
release:
|
release:
|
||||||
description: A release of a listing.
|
description: A release of a listing.
|
||||||
$ref: '#/components/schemas/ReleaseInListing'
|
$ref: '#/components/schemas/ReleaseInListing'
|
||||||
@@ -2976,7 +3025,7 @@ components:
|
|||||||
type: integer
|
type: integer
|
||||||
minimum: 0
|
minimum: 0
|
||||||
in_cart:
|
in_cart:
|
||||||
description: A flag that indicates whether a listing is in the shopping cart of a user.
|
description: A flag that indicates whether a listing is in the shopping cart of a user, if any.
|
||||||
type: boolean
|
type: boolean
|
||||||
required:
|
required:
|
||||||
- allow_offers
|
- allow_offers
|
||||||
@@ -2984,11 +3033,15 @@ components:
|
|||||||
- comments
|
- comments
|
||||||
- condition
|
- condition
|
||||||
- id
|
- id
|
||||||
|
- offer_submitted
|
||||||
|
- original_price
|
||||||
|
- original_shipping_price
|
||||||
- posted
|
- posted
|
||||||
- price
|
- price
|
||||||
- release
|
- release
|
||||||
- resource_url
|
- resource_url
|
||||||
- seller
|
- seller
|
||||||
|
- shipping_price
|
||||||
- ships_from
|
- ships_from
|
||||||
- sleeve_condition
|
- sleeve_condition
|
||||||
- status
|
- status
|
||||||
@@ -3078,6 +3131,31 @@ components:
|
|||||||
required:
|
required:
|
||||||
- currency
|
- currency
|
||||||
- value
|
- value
|
||||||
|
PriceFormatted:
|
||||||
|
description: A type that represents a formatted price.
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
curr_abbr:
|
||||||
|
description: An abbreviation of a currency in a marketplace.
|
||||||
|
$ref: '#/components/schemas/Currency'
|
||||||
|
curr_id:
|
||||||
|
description: An identifier of a currency in a marketplace.
|
||||||
|
type: integer
|
||||||
|
minimum: 0
|
||||||
|
readOnly: true
|
||||||
|
formatted:
|
||||||
|
description: A price in formatted form.
|
||||||
|
type: string
|
||||||
|
value:
|
||||||
|
description: A decimal number of a price.
|
||||||
|
type: number
|
||||||
|
format: float
|
||||||
|
minimum: 0
|
||||||
|
required:
|
||||||
|
- curr_abbr
|
||||||
|
- curr_id
|
||||||
|
- formatted
|
||||||
|
- value
|
||||||
Rating:
|
Rating:
|
||||||
description: A type that represents a community rating of a release.
|
description: A type that represents a community rating of a release.
|
||||||
type: object
|
type: object
|
||||||
@@ -3159,6 +3237,12 @@ components:
|
|||||||
format_quantity:
|
format_quantity:
|
||||||
description: A total number of formats of a release.
|
description: A total number of formats of a release.
|
||||||
type: integer
|
type: integer
|
||||||
|
blocked_from_sale:
|
||||||
|
description: A flag that indicates whether the a released is blocked for sale in a marketplace.
|
||||||
|
type: boolean
|
||||||
|
is_offensive:
|
||||||
|
description: A flag that indicates whether a release have explicit language/content or not.
|
||||||
|
type: boolean
|
||||||
master_id:
|
master_id:
|
||||||
description: An identifier of a master associated with a release, if any.
|
description: An identifier of a master associated with a release, if any.
|
||||||
type: integer
|
type: integer
|
||||||
@@ -3200,17 +3284,22 @@ components:
|
|||||||
description: Some community information of a release.
|
description: Some community information of a release.
|
||||||
$ref: '#/components/schemas/Community'
|
$ref: '#/components/schemas/Community'
|
||||||
companies:
|
companies:
|
||||||
description: A list of companies related to a release.
|
description: A list of companies related to a release, if any.
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/LabelId'
|
$ref: '#/components/schemas/LabelId'
|
||||||
tracklist:
|
tracklist:
|
||||||
description: A list of tracks of a release.
|
description: A list of tracks of a release, if any.
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/Track'
|
$ref: '#/components/schemas/Track'
|
||||||
|
images:
|
||||||
|
description: A list of images of a release, if any.
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Image'
|
||||||
videos:
|
videos:
|
||||||
description: A list of videos associated with a release.
|
description: A list of videos associated with a release, if any.
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/Video'
|
$ref: '#/components/schemas/Video'
|
||||||
@@ -3309,21 +3398,61 @@ components:
|
|||||||
catalog_number:
|
catalog_number:
|
||||||
description: A catalog number of a release.
|
description: A catalog number of a release.
|
||||||
type: string
|
type: string
|
||||||
|
title:
|
||||||
|
description: A title of a release.
|
||||||
|
type: string
|
||||||
|
artist:
|
||||||
|
description: An artist of a release.
|
||||||
|
type: string
|
||||||
|
label:
|
||||||
|
description: A label of a release.
|
||||||
|
type: string
|
||||||
description:
|
description:
|
||||||
description: A descriptive explanation of a release.
|
description: A descriptive explanation of a release.
|
||||||
type: string
|
type: string
|
||||||
thumbnail:
|
|
||||||
description: A thumbnail image of a release.
|
|
||||||
type: string
|
|
||||||
format: uri
|
|
||||||
year:
|
year:
|
||||||
description: A number of year of a release.
|
description: A number of year of a release.
|
||||||
type: integer
|
type: integer
|
||||||
minimum: 1800
|
minimum: 1800
|
||||||
|
thumbnail:
|
||||||
|
description: A thumbnail image of a release.
|
||||||
|
type: string
|
||||||
|
format: uri
|
||||||
|
images:
|
||||||
|
description: A list of images associated with a release.
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Image'
|
||||||
|
stats:
|
||||||
|
description: A type that represents statistical information about a release.
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
community:
|
||||||
|
description: A type that represents statistical information about a release provided by a community.
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
in_collection:
|
||||||
|
description: A total number of users in a community that have a release in their collection.
|
||||||
|
type: integer
|
||||||
|
minimum: 0
|
||||||
|
in_wantlist:
|
||||||
|
description: A total number of users in a community that have a release in their wantlist.
|
||||||
|
type: integer
|
||||||
|
minimum: 0
|
||||||
|
required:
|
||||||
|
- in_collection
|
||||||
|
- in_wantlist
|
||||||
|
required:
|
||||||
|
- community
|
||||||
required:
|
required:
|
||||||
|
- artist
|
||||||
- catalog_number
|
- catalog_number
|
||||||
- description
|
- description
|
||||||
|
- images
|
||||||
|
- label
|
||||||
- thumbnail
|
- thumbnail
|
||||||
|
- stats
|
||||||
|
- title
|
||||||
- year
|
- year
|
||||||
ReleaseInstance:
|
ReleaseInstance:
|
||||||
description: A type that represents an instace of a release.
|
description: A type that represents an instace of a release.
|
||||||
@@ -3575,6 +3704,70 @@ components:
|
|||||||
- type
|
- type
|
||||||
- uri
|
- uri
|
||||||
- year
|
- year
|
||||||
|
Seller:
|
||||||
|
description: A type that represents a user that sells inventory in a marketplace.
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/UserId'
|
||||||
|
- type: object
|
||||||
|
properties:
|
||||||
|
uid:
|
||||||
|
description: An identifier of a user associated with a seller.
|
||||||
|
type: integer
|
||||||
|
minimum: 0
|
||||||
|
readOnly: true
|
||||||
|
url:
|
||||||
|
description: A URI related to a user.
|
||||||
|
type: string
|
||||||
|
format: uri
|
||||||
|
avatar_url:
|
||||||
|
description: An avatar URL of a user.
|
||||||
|
type: string
|
||||||
|
format: uri
|
||||||
|
html_url:
|
||||||
|
description: A URL to the website of a seller.
|
||||||
|
type: string
|
||||||
|
format: uri
|
||||||
|
min_order_total:
|
||||||
|
description: A number of
|
||||||
|
type: integer
|
||||||
|
minimum: 0
|
||||||
|
payment:
|
||||||
|
description: A payment type preferred by a seller.
|
||||||
|
type: string
|
||||||
|
shipping:
|
||||||
|
description: An explanation of the shipping conditions of a seller.
|
||||||
|
type: string
|
||||||
|
stats:
|
||||||
|
description: A type that represents the statistics associated with a seller.
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
rating:
|
||||||
|
description: A total percentage number of the ratings given to a seller.
|
||||||
|
type: string
|
||||||
|
maxLength: 5
|
||||||
|
pattern: '^\d{1,3}\.\d{1}$'
|
||||||
|
stars:
|
||||||
|
description: An average number of stars given to a seller.
|
||||||
|
type: number
|
||||||
|
format: float
|
||||||
|
minimum: 0
|
||||||
|
maximum: 5
|
||||||
|
total:
|
||||||
|
description: A total number of rating reviews given to a seller.
|
||||||
|
type: integer
|
||||||
|
minimum: 0
|
||||||
|
required:
|
||||||
|
- rating
|
||||||
|
- stars
|
||||||
|
- total
|
||||||
|
required:
|
||||||
|
- avatar_url
|
||||||
|
- html_url
|
||||||
|
- min_order_total
|
||||||
|
- payment
|
||||||
|
- shipping
|
||||||
|
- uid
|
||||||
|
- url
|
||||||
Service:
|
Service:
|
||||||
description: A type that encapsulates any available information about the service.
|
description: A type that encapsulates any available information about the service.
|
||||||
type: object
|
type: object
|
||||||
@@ -3646,7 +3839,7 @@ components:
|
|||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
description: An identifier of a user.
|
description: An identifier of a user, if any.
|
||||||
type: integer
|
type: integer
|
||||||
username:
|
username:
|
||||||
description: A username of a user.
|
description: A username of a user.
|
||||||
|
|||||||
Reference in New Issue
Block a user