Implemented the GET /marketplace/fee/{price}/{currency} endpoint for the Open API specification document in the library target.

This commit is contained in:
2025-11-10 00:27:07 +01:00
parent 2bcb1426e3
commit 147930aeaa
+43
View File
@@ -2239,6 +2239,42 @@ paths:
$ref: '#/components/responses/Unauthorized'
'500':
$ref: '#/components/responses/InternalError'
/marketplace/fee/{price}/{currency}:
get:
tags:
- Marketplace
summary: Get an estimated fee for selling an item in a marketplace, based on a given currency.
description: |
Calculates an estimated fee for selling an item in a marketplace, based on a given currency.
This endpoints requires authentication.
operationId: getFeeWithCurrency
parameters:
- $ref: '#/components/parameters/Price'
- $ref: '#/components/parameters/CurrencyInPath'
security:
- ConsumerKeySecret: []
- UserToken: []
- OAuth: []
responses:
'200':
description: Successfully retrieves an estimated fee for selling an item in a marketplace, based on a given currency.
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:
description: An estimated fee in a default currency.
$ref: '#/components/schemas/Price'
'401':
$ref: '#/components/responses/Unauthorized'
'500':
$ref: '#/components/responses/InternalError'
components:
headers:
Link:
@@ -2338,6 +2374,13 @@ components:
in: query
schema:
$ref: '#/components/schemas/Currency'
CurrencyInPath:
description: A currency code in a marketplace.
name: currency
in: path
required: true
schema:
$ref: '#/components/schemas/Currency'
FieldId:
description: An identifier of a custom field.
name: field_id