Files
discogs-service/docs/data/documentation/discogsservice/client/getlisting(path:query:headers:).json
T
javier a0672cc4af 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>
2025-11-10 00:34:18 +00:00

1 line
18 KiB
JSON

{"sections":[],"schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"type":"text","text":"Get information about a listing in the marketplace."}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/discogsservice\/client\/getlisting(path:query:headers:)"]}],"identifier":{"url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getListing(path:query:headers:)","interfaceLanguage":"swift"},"metadata":{"title":"getListing(path:query:headers:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"getListing"},{"text":"(","kind":"text"},{"text":"path","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO","text":"GetListing","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO5InputV"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Path","preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO5InputV4PathV"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"query"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"GetListing","preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO5InputV"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Query","preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO5InputV5QueryV"},{"kind":"text","text":", "},{"kind":"externalParam","text":"headers"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"GetListing","preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO5InputV"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Headers","preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO5InputV7HeadersV"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"GetListing","preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO6OutputO"}],"role":"symbol","extendedModule":"DiscogsService","modules":[{"name":"DiscogsService"}],"symbolKind":"method","externalID":"s:14DiscogsService11APIProtocolPAAE10getListing4path5query7headersAA10OperationsO03GetE0O6OutputOAK5InputV4PathV_AO5QueryVAO7HeadersVtYaKF::SYNTHESIZED::s:14DiscogsService6ClientV","roleHeading":"Instance Method"},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"getListing"},{"kind":"text","text":"("},{"kind":"externalParam","text":"path"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"GetListing","preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetListing"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO5InputV","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetListing\/Input"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Path","preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO5InputV4PathV","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetListing\/Input\/Path-swift.struct"},{"kind":"text","text":", "},{"kind":"externalParam","text":"query"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"GetListing","preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetListing"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO5InputV","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetListing\/Input"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Query","preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO5InputV5QueryV","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetListing\/Input\/Query-swift.struct"},{"kind":"text","text":" = .init(), "},{"kind":"externalParam","text":"headers"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"GetListing","preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetListing"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO5InputV","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetListing\/Input"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Headers","preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO5InputV7HeadersV","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetListing\/Input\/Headers-swift.struct"},{"kind":"text","text":" = .init()) "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"GetListing","preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetListing"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO6OutputO","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetListing\/Output"}],"platforms":["macOS"]}]},{"kind":"content","content":[{"level":2,"type":"heading","text":"Discussion","anchor":"discussion"},{"inlineContent":[{"text":"Views the data associated with a listing in the marketplace.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"In case of authenticated as an inventory owner, items that not only have the ","type":"text"},{"code":"For Sale","type":"codeVoice"},{"text":" state will be shown as well as other extra fields in those items such as ","type":"text"},{"code":"weight","type":"codeVoice"},{"text":", ","type":"text"},{"code":"format_quality","type":"codeVoice"},{"text":", ","type":"text"},{"code":"external_id","type":"codeVoice"},{"text":", ","type":"text"},{"code":"location","type":"codeVoice"},{"text":", and ","type":"text"},{"code":"quantity_keys","type":"codeVoice"},{"text":". Note that the ","type":"text"},{"code":"quantity","type":"codeVoice"},{"text":" field is read-only for ","type":"text"},{"inlineContent":[{"type":"text","text":"NearMint"}],"type":"emphasis"},{"text":" users, who will see ","type":"text"},{"inlineContent":[{"type":"text","text":"1"}],"type":"emphasis"},{"text":" for all quantity values, regardless of their actual count.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"In case the user is authorized, the listing will contain a ","type":"text"},{"code":"in_cart","type":"codeVoice"},{"text":" boolean field indicating whether or not this listing is in their cart.","type":"text"}],"type":"paragraph"},{"name":"Remark","type":"aside","style":"note","content":[{"inlineContent":[{"type":"text","text":"HTTP "},{"type":"codeVoice","code":"GET \/marketplace\/listings\/{listing_id}"},{"type":"text","text":"."}],"type":"paragraph"}]},{"name":"Remark","type":"aside","style":"note","content":[{"inlineContent":[{"type":"text","text":"Generated from "},{"type":"codeVoice","code":"#\/paths\/\/marketplace\/listings\/{listing_id}\/get(getListing)"},{"type":"text","text":"."}],"type":"paragraph"}]}]}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client"]]},"references":{"doc://DiscogsService/documentation/DiscogsService/Operations/GetListing/Input/Headers-swift.struct":{"abstract":[],"kind":"symbol","type":"topic","title":"Operations.GetListing.Input.Headers","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetListing\/Input\/Headers-swift.struct","url":"\/documentation\/discogsservice\/operations\/getlisting\/input\/headers-swift.struct","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Headers","kind":"identifier"}],"role":"symbol","navigatorTitle":[{"text":"Headers","kind":"identifier"}]},"doc://DiscogsService/documentation/DiscogsService/Operations/GetListing/Input/Path-swift.struct":{"abstract":[],"kind":"symbol","title":"Operations.GetListing.Input.Path","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetListing\/Input\/Path-swift.struct","type":"topic","url":"\/documentation\/discogsservice\/operations\/getlisting\/input\/path-swift.struct","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Path","kind":"identifier"}],"role":"symbol","navigatorTitle":[{"text":"Path","kind":"identifier"}]},"doc://DiscogsService/documentation/DiscogsService/Operations/GetListing/Input":{"kind":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Input","kind":"identifier"}],"abstract":[],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetListing\/Input","title":"Operations.GetListing.Input","url":"\/documentation\/discogsservice\/operations\/getlisting\/input","role":"symbol","navigatorTitle":[{"text":"Input","kind":"identifier"}],"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/Client":{"kind":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Client","kind":"identifier"}],"abstract":[{"text":"The Discogs API v2.0 is a RESTful interface to Discogs data. You can access JSON-formatted information about Database objects such as ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"Artists"}]},{"text":", ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"Releases"}]},{"text":", and ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"Labels"}]},{"text":". Your application can also manage ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"User Collections"}]},{"text":" and ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"Wantlists"}]},{"text":", create ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"Marketplace"}]},{"text":" listings, and more.","type":"text"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client","title":"Client","url":"\/documentation\/discogsservice\/client","role":"symbol","navigatorTitle":[{"text":"Client","kind":"identifier"}],"type":"topic"},"doc://DiscogsService/documentation/DiscogsService/Operations/GetListing/Input/Query-swift.struct":{"kind":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Query","kind":"identifier"}],"abstract":[],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetListing\/Input\/Query-swift.struct","title":"Operations.GetListing.Input.Query","url":"\/documentation\/discogsservice\/operations\/getlisting\/input\/query-swift.struct","role":"symbol","navigatorTitle":[{"text":"Query","kind":"identifier"}],"type":"topic"},"doc://DiscogsService/documentation/DiscogsService/Client/getListing(path:query:headers:)":{"role":"symbol","type":"topic","abstract":[{"type":"text","text":"Get information about a listing in the marketplace."}],"kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getListing(path:query:headers:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"getListing","kind":"identifier"},{"text":"(","kind":"text"},{"text":"path","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO","text":"GetListing","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO5InputV","text":"Input","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO5InputV4PathV","text":"Path","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"query","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO","text":"GetListing","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO5InputV","text":"Input","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO5InputV5QueryV","text":"Query","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"headers","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO","text":"GetListing","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO5InputV","text":"Input","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO5InputV7HeadersV","text":"Headers","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO","text":"GetListing","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO10GetListingO6OutputO","text":"Output","kind":"typeIdentifier"}],"title":"getListing(path:query:headers:)","url":"\/documentation\/discogsservice\/client\/getlisting(path:query:headers:)"},"doc://DiscogsService/documentation/DiscogsService/Operations":{"type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"text":"Operations","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"Operations"}],"title":"Operations","url":"\/documentation\/discogsservice\/operations","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","abstract":[{"type":"text","text":"API operations, with input and output types, generated from "},{"type":"codeVoice","code":"#\/paths"},{"text":" in the OpenAPI document.","type":"text"}],"kind":"symbol"},"doc://DiscogsService/documentation/DiscogsService/Operations/GetListing":{"url":"\/documentation\/discogsservice\/operations\/getlisting","title":"Operations.GetListing","role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"GetListing"}],"navigatorTitle":[{"kind":"identifier","text":"GetListing"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetListing","kind":"symbol","abstract":[{"type":"text","text":"Get information about a listing in the marketplace."}],"type":"topic"},"doc://DiscogsService/documentation/DiscogsService/Operations/GetListing/Output":{"url":"\/documentation\/discogsservice\/operations\/getlisting\/output","title":"Operations.GetListing.Output","role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}],"navigatorTitle":[{"text":"Output","kind":"identifier"}],"kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetListing\/Output","abstract":[],"type":"topic"}}}