Implemented the Marketplace endpoints (#15)

This PR contains the work done to implement the *Marketplace* endpoints for the **Discogs API** backend service, which include the following endpoints:
* GET `/users/{username}/inventory` endpoint
* GET `/marketplace/listings/{listing_id}` endpoint
* DELETE `/marketplace/listings/{listing_id}` endpoint
* POST `/marketplace/listings/{listing_id}` endpoint
* POST `/marketplace/listings` endpoint
* GET `/marketplace/orders` endpoint
* GET `/marketplace/orders/{order_id}` endpoint
* GET `/marketplace/orders/{order_id}/messages` endpoint
* POST `/marketplace/orders/{order_id}/messages` endpoint
* GET `/marketplace/fee/{price}` endpoint
* GET `/marketplace/fee/{price}/{currency}` endpoint
* GET `/marketplace/price_suggestions/{release_id}` endpoint
* GET `/marketplace/stats/{release_id}` endpoint

Reviewed-on: #15
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
This commit was merged in pull request #15.
This commit is contained in:
2025-11-10 00:34:18 +00:00
committed by Javier Cicchelli
parent 63118db805
commit a0672cc4af
8111 changed files with 9517 additions and 4502 deletions
@@ -1 +1 @@
{"sections":[],"kind":"symbol","identifier":{"url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/UserIdentity\/encode(to:)","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/UserIdentity"]]},"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"encode"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"to"},{"text":" ","kind":"text"},{"text":"encoder","kind":"internalParam"},{"kind":"text","text":": any "},{"text":"Encoder","kind":"typeIdentifier","preciseIdentifier":"s:s7EncoderP"},{"text":") ","kind":"text"},{"kind":"keyword","text":"throws"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"}],"metadata":{"modules":[{"name":"DiscogsService"}],"roleHeading":"Instance Method","symbolKind":"method","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"encode","kind":"identifier"},{"text":"(","kind":"text"},{"text":"to","kind":"externalParam"},{"text":": any ","kind":"text"},{"preciseIdentifier":"s:s7EncoderP","kind":"typeIdentifier","text":"Encoder"},{"kind":"text","text":") "},{"kind":"keyword","text":"throws"}],"role":"symbol","title":"encode(to:)","externalID":"s:14DiscogsService10ComponentsO7SchemasO12UserIdentityV6encode2toys7Encoder_p_tKF"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/discogsservice\/components\/schemas\/useridentity\/encode(to:)"]}],"references":{"doc://DiscogsService/documentation/DiscogsService/Components":{"url":"\/documentation\/discogsservice\/components","role":"symbol","navigatorTitle":[{"text":"Components","kind":"identifier"}],"abstract":[{"type":"text","text":"Types generated from the components section of the OpenAPI document."}],"title":"Components","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"text":"Components","kind":"identifier"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components"},"doc://DiscogsService/documentation/DiscogsService/Components/Schemas/UserIdentity/encode(to:)":{"kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/UserIdentity\/encode(to:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"encode"},{"text":"(","kind":"text"},{"text":"to","kind":"externalParam"},{"text":": any ","kind":"text"},{"preciseIdentifier":"s:s7EncoderP","text":"Encoder","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"throws","kind":"keyword"}],"role":"symbol","type":"topic","title":"encode(to:)","abstract":[],"url":"\/documentation\/discogsservice\/components\/schemas\/useridentity\/encode(to:)"},"doc://DiscogsService/documentation/DiscogsService/Components/Schemas":{"type":"topic","navigatorTitle":[{"kind":"identifier","text":"Schemas"}],"url":"\/documentation\/discogsservice\/components\/schemas","abstract":[{"text":"Types generated from the ","type":"text"},{"code":"#\/components\/schemas","type":"codeVoice"},{"type":"text","text":" section of the OpenAPI document."}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas","fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Schemas"}],"role":"symbol","kind":"symbol","title":"Components.Schemas"},"doc://DiscogsService/documentation/DiscogsService/Components/Schemas/UserIdentity":{"type":"topic","navigatorTitle":[{"text":"UserIdentity","kind":"identifier"}],"url":"\/documentation\/discogsservice\/components\/schemas\/useridentity","abstract":[{"type":"text","text":"A type that represents a user identity."}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/UserIdentity","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"UserIdentity","kind":"identifier"}],"role":"symbol","kind":"symbol","title":"Components.Schemas.UserIdentity"},"doc://DiscogsService/documentation/DiscogsService":{"url":"\/documentation\/discogsservice","role":"collection","abstract":[],"title":"DiscogsService","type":"topic","kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService"}}}
{"schemaVersion":{"minor":3,"major":0,"patch":0},"sections":[],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"encode"},{"kind":"text","text":"("},{"kind":"externalParam","text":"to"},{"kind":"text","text":" "},{"kind":"internalParam","text":"encoder"},{"kind":"text","text":": any "},{"kind":"typeIdentifier","text":"Encoder","preciseIdentifier":"s:s7EncoderP"},{"kind":"text","text":") "},{"kind":"keyword","text":"throws"}]}],"kind":"declarations"}],"kind":"symbol","metadata":{"externalID":"s:14DiscogsService10ComponentsO7SchemasO12UserIdentityV6encode2toys7Encoder_p_tKF","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"encode","kind":"identifier"},{"text":"(","kind":"text"},{"text":"to","kind":"externalParam"},{"text":": any ","kind":"text"},{"text":"Encoder","preciseIdentifier":"s:s7EncoderP","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"throws","kind":"keyword"}],"symbolKind":"method","roleHeading":"Instance Method","title":"encode(to:)","modules":[{"name":"DiscogsService"}]},"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/UserIdentity"]]},"variants":[{"paths":["\/documentation\/discogsservice\/components\/schemas\/useridentity\/encode(to:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/UserIdentity\/encode(to:)","interfaceLanguage":"swift"},"references":{"doc://DiscogsService/documentation/DiscogsService/Components/Schemas":{"url":"\/documentation\/discogsservice\/components\/schemas","title":"Components.Schemas","role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"Schemas"}],"navigatorTitle":[{"kind":"identifier","text":"Schemas"}],"kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas","abstract":[{"text":"Types generated from the ","type":"text"},{"code":"#\/components\/schemas","type":"codeVoice"},{"text":" section of the OpenAPI document.","type":"text"}],"type":"topic"},"doc://DiscogsService/documentation/DiscogsService":{"title":"DiscogsService","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService","url":"\/documentation\/discogsservice","abstract":[],"role":"collection","kind":"symbol","type":"topic"},"doc://DiscogsService/documentation/DiscogsService/Components/Schemas/UserIdentity":{"kind":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"UserIdentity","kind":"identifier"}],"abstract":[{"text":"A type that represents a user identity.","type":"text"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/UserIdentity","title":"Components.Schemas.UserIdentity","url":"\/documentation\/discogsservice\/components\/schemas\/useridentity","role":"symbol","navigatorTitle":[{"text":"UserIdentity","kind":"identifier"}],"type":"topic"},"doc://DiscogsService/documentation/DiscogsService/Components/Schemas/UserIdentity/encode(to:)":{"type":"topic","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"encode","kind":"identifier"},{"text":"(","kind":"text"},{"text":"to","kind":"externalParam"},{"text":": any ","kind":"text"},{"text":"Encoder","kind":"typeIdentifier","preciseIdentifier":"s:s7EncoderP"},{"text":") ","kind":"text"},{"text":"throws","kind":"keyword"}],"title":"encode(to:)","url":"\/documentation\/discogsservice\/components\/schemas\/useridentity\/encode(to:)","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/UserIdentity\/encode(to:)","abstract":[],"kind":"symbol"},"doc://DiscogsService/documentation/DiscogsService/Components":{"type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"Components"}],"navigatorTitle":[{"text":"Components","kind":"identifier"}],"title":"Components","url":"\/documentation\/discogsservice\/components","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components","abstract":[{"text":"Types generated from the components section of the OpenAPI document.","type":"text"}],"kind":"symbol"}}}