Files
discogs-service/docs/data/documentation/discogsservice/client/getinventory(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

{"schemaVersion":{"patch":0,"major":0,"minor":3},"sections":[],"abstract":[{"type":"text","text":"Get the listings in an inventory of a seller."}],"variants":[{"paths":["\/documentation\/discogsservice\/client\/getinventory(path:query:headers:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getInventory(path:query:headers:)"},"metadata":{"title":"getInventory(path:query:headers:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"getInventory","kind":"identifier"},{"text":"(","kind":"text"},{"text":"path","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"GetInventory","preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO5InputV","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Path","preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO5InputV4PathV","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"query","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"GetInventory","preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO5InputV","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Query","preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO5InputV5QueryV","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"headers","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"GetInventory","preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO5InputV","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Headers","preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO5InputV7HeadersV","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"GetInventory","preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO6OutputO","kind":"typeIdentifier"}],"role":"symbol","extendedModule":"DiscogsService","modules":[{"name":"DiscogsService"}],"symbolKind":"method","externalID":"s:14DiscogsService11APIProtocolPAAE12getInventory4path5query7headersAA10OperationsO03GetE0O6OutputOAK5InputV4PathV_AO5QueryVAO7HeadersVtYaKF::SYNTHESIZED::s:14DiscogsService6ClientV","roleHeading":"Instance Method"},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"getInventory"},{"kind":"text","text":"("},{"kind":"externalParam","text":"path"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Operations","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"GetInventory","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetInventory","preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Input","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetInventory\/Input","preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO5InputV"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Path","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetInventory\/Input\/Path-swift.struct","preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO5InputV4PathV"},{"kind":"text","text":", "},{"kind":"externalParam","text":"query"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Operations","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"GetInventory","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetInventory","preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Input","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetInventory\/Input","preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO5InputV"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Query","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetInventory\/Input\/Query-swift.struct","preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO5InputV5QueryV"},{"kind":"text","text":" = .init(), "},{"kind":"externalParam","text":"headers"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Operations","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"GetInventory","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetInventory","preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Input","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetInventory\/Input","preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO5InputV"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Headers","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetInventory\/Input\/Headers-swift.struct","preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO5InputV7HeadersV"},{"kind":"text","text":" = .init()) "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","text":"Operations","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"GetInventory","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetInventory","preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Output","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetInventory\/Output","preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO6OutputO"}],"platforms":["macOS"]}]},{"kind":"content","content":[{"type":"heading","text":"Discussion","level":2,"anchor":"discussion"},{"type":"paragraph","inlineContent":[{"text":"Returns the list of listings for an inventory of a user.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"Basic information about each listing and the corresponding release is provided, suitable for display in a list. For detailed information about the release, make another API call to fetch the corresponding Release.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"This endpoints accepts pagination and also, 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"},{"type":"emphasis","inlineContent":[{"type":"text","text":"NearMint"}]},{"text":" users, who will see ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"1"}]},{"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"}]},{"style":"note","type":"aside","name":"Remark","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"HTTP "},{"code":"GET \/users\/{username}\/inventory","type":"codeVoice"},{"type":"text","text":"."}]}]},{"style":"note","type":"aside","name":"Remark","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Generated from "},{"code":"#\/paths\/\/users\/{username}\/inventory\/get(getInventory)","type":"codeVoice"},{"type":"text","text":"."}]}]}]}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client"]]},"references":{"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/GetInventory/Input":{"abstract":[],"kind":"symbol","type":"topic","title":"Operations.GetInventory.Input","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetInventory\/Input","url":"\/documentation\/discogsservice\/operations\/getinventory\/input","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Input"}],"role":"symbol","navigatorTitle":[{"text":"Input","kind":"identifier"}]},"doc://DiscogsService/documentation/DiscogsService/Operations/GetInventory":{"abstract":[{"text":"Get the listings in an inventory of a seller.","type":"text"}],"kind":"symbol","type":"topic","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetInventory","title":"Operations.GetInventory","url":"\/documentation\/discogsservice\/operations\/getinventory","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"GetInventory"}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"GetInventory"}]},"doc://DiscogsService/documentation/DiscogsService/Client/getInventory(path:query:headers:)":{"title":"getInventory(path:query:headers:)","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getInventory(path:query:headers:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"getInventory"},{"kind":"text","text":"("},{"kind":"externalParam","text":"path"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO","text":"GetInventory","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO5InputV","text":"Input","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO5InputV4PathV","text":"Path","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"query","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO","text":"GetInventory","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO5InputV","kind":"typeIdentifier","text":"Input"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO5InputV5QueryV","text":"Query","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"headers"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier","text":"Operations"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO","kind":"typeIdentifier","text":"GetInventory"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO5InputV"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Headers","preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO5InputV7HeadersV"},{"kind":"text","text":") "},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO","text":"GetInventory","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO12GetInventoryO6OutputO","text":"Output"}],"url":"\/documentation\/discogsservice\/client\/getinventory(path:query:headers:)","abstract":[{"type":"text","text":"Get the listings in an inventory of a seller."}],"role":"symbol","kind":"symbol","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/Operations/GetInventory/Input/Headers-swift.struct":{"abstract":[],"kind":"symbol","type":"topic","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetInventory\/Input\/Headers-swift.struct","title":"Operations.GetInventory.Input.Headers","url":"\/documentation\/discogsservice\/operations\/getinventory\/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/GetInventory/Output":{"kind":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}],"abstract":[],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetInventory\/Output","title":"Operations.GetInventory.Output","url":"\/documentation\/discogsservice\/operations\/getinventory\/output","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Output"}],"type":"topic"},"doc://DiscogsService/documentation/DiscogsService/Operations/GetInventory/Input/Query-swift.struct":{"url":"\/documentation\/discogsservice\/operations\/getinventory\/input\/query-swift.struct","title":"Operations.GetInventory.Input.Query","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Query"}],"navigatorTitle":[{"kind":"identifier","text":"Query"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetInventory\/Input\/Query-swift.struct","kind":"symbol","abstract":[],"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/GetInventory/Input/Path-swift.struct":{"type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Path"}],"navigatorTitle":[{"kind":"identifier","text":"Path"}],"title":"Operations.GetInventory.Input.Path","url":"\/documentation\/discogsservice\/operations\/getinventory\/input\/path-swift.struct","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetInventory\/Input\/Path-swift.struct","abstract":[],"kind":"symbol"}}}