Files
discogs-service/docs/data/documentation/discogsservice/client/createlisting(headers:body:).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
15 KiB
JSON

{"sections":[],"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client"]]},"metadata":{"role":"symbol","externalID":"s:14DiscogsService11APIProtocolPAAE13createListing7headers4bodyAA10OperationsO06CreateE0O6OutputOAJ5InputV7HeadersV_AA10ComponentsO13RequestBodiesO0E0OtYaKF::SYNTHESIZED::s:14DiscogsService6ClientV","symbolKind":"method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"createListing","kind":"identifier"},{"text":"(","kind":"text"},{"text":"headers","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO13CreateListingO","text":"CreateListing","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO13CreateListingO5InputV","text":"Input","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO13CreateListingO5InputV7HeadersV","text":"Headers","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"body","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10ComponentsO","text":"Components","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10ComponentsO13RequestBodiesO","text":"RequestBodies","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10ComponentsO13RequestBodiesO7ListingO","text":"Listing","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:14DiscogsService10OperationsO13CreateListingO","text":"CreateListing","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO13CreateListingO6OutputO","text":"Output","kind":"typeIdentifier"}],"roleHeading":"Instance Method","extendedModule":"DiscogsService","title":"createListing(headers:body:)","modules":[{"name":"DiscogsService"}]},"abstract":[{"type":"text","text":"Create a new listing in a marketplace."}],"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"createListing","kind":"identifier"},{"text":"(","kind":"text"},{"text":"headers","kind":"externalParam"},{"text":": ","kind":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","text":"Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/CreateListing","text":"CreateListing","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO13CreateListingO"},{"text":".","kind":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/CreateListing\/Input","text":"Input","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO13CreateListingO5InputV"},{"text":".","kind":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/CreateListing\/Input\/Headers-swift.struct","text":"Headers","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO13CreateListingO5InputV7HeadersV"},{"text":" = .init(), ","kind":"text"},{"text":"body","kind":"externalParam"},{"text":": ","kind":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components","text":"Components","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO"},{"text":".","kind":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/RequestBodies","text":"RequestBodies","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO13RequestBodiesO"},{"text":".","kind":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/RequestBodies\/Listing","text":"Listing","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO13RequestBodiesO7ListingO"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","text":"Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/CreateListing","text":"CreateListing","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO13CreateListingO"},{"text":".","kind":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/CreateListing\/Output","text":"Output","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO13CreateListingO6OutputO"}],"platforms":["macOS"],"languages":["swift"]}]},{"kind":"content","content":[{"type":"heading","anchor":"discussion","level":2,"text":"Discussion"},{"inlineContent":[{"type":"text","text":"Createa a new listing in a marketplace."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"This endpoint requires authentication, to add a listing into an inventory of an authenticated user."}],"type":"paragraph"},{"name":"Remark","type":"aside","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"HTTP "},{"type":"codeVoice","code":"POST \/marketplace\/listings"},{"type":"text","text":"."}]}],"style":"note"},{"name":"Remark","type":"aside","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Generated from "},{"type":"codeVoice","code":"#\/paths\/\/marketplace\/listings\/post(createListing)"},{"type":"text","text":"."}]}],"style":"note"}]}],"kind":"symbol","identifier":{"url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/createListing(headers:body:)","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/discogsservice\/client\/createlisting(headers:body:)"]}],"references":{"doc://DiscogsService/documentation/DiscogsService/Components/RequestBodies/Listing":{"url":"\/documentation\/discogsservice\/components\/requestbodies\/listing","title":"Components.RequestBodies.Listing","role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"Listing"}],"navigatorTitle":[{"kind":"identifier","text":"Listing"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/RequestBodies\/Listing","kind":"symbol","abstract":[],"type":"topic"},"doc://DiscogsService/documentation/DiscogsService/Operations/CreateListing/Output":{"url":"\/documentation\/discogsservice\/operations\/createlisting\/output","title":"Operations.CreateListing.Output","role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}],"navigatorTitle":[{"kind":"identifier","text":"Output"}],"kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/CreateListing\/Output","abstract":[],"type":"topic"},"doc://DiscogsService/documentation/DiscogsService/Operations/CreateListing/Input":{"url":"\/documentation\/discogsservice\/operations\/createlisting\/input","title":"Operations.CreateListing.Input","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Input"}],"navigatorTitle":[{"kind":"identifier","text":"Input"}],"kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/CreateListing\/Input","abstract":[],"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/CreateListing":{"url":"\/documentation\/discogsservice\/operations\/createlisting","title":"Operations.CreateListing","role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"CreateListing"}],"navigatorTitle":[{"kind":"identifier","text":"CreateListing"}],"kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/CreateListing","abstract":[{"text":"Create a new listing in a marketplace.","type":"text"}],"type":"topic"},"doc://DiscogsService/documentation/DiscogsService/Client/createListing(headers:body:)":{"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"createListing","kind":"identifier"},{"text":"(","kind":"text"},{"text":"headers","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"text":"CreateListing","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO13CreateListingO"},{"text":".","kind":"text"},{"text":"Input","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO13CreateListingO5InputV"},{"text":".","kind":"text"},{"text":"Headers","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO13CreateListingO5InputV7HeadersV"},{"text":", ","kind":"text"},{"text":"body","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Components","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO"},{"text":".","kind":"text"},{"text":"RequestBodies","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO13RequestBodiesO"},{"text":".","kind":"text"},{"text":"Listing","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO13RequestBodiesO7ListingO"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"text":"Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"text":"CreateListing","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO13CreateListingO"},{"text":".","kind":"text"},{"text":"Output","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO13CreateListingO6OutputO"}],"abstract":[{"type":"text","text":"Create a new listing in a marketplace."}],"kind":"symbol","type":"topic","title":"createListing(headers:body:)","url":"\/documentation\/discogsservice\/client\/createlisting(headers:body:)","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/createListing(headers:body:)"},"doc://DiscogsService/documentation/DiscogsService/Operations/CreateListing/Input/Headers-swift.struct":{"abstract":[],"kind":"symbol","type":"topic","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/CreateListing\/Input\/Headers-swift.struct","title":"Operations.CreateListing.Input.Headers","url":"\/documentation\/discogsservice\/operations\/createlisting\/input\/headers-swift.struct","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Headers"}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Headers"}]},"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"},"doc://DiscogsService/documentation/DiscogsService/Components/RequestBodies":{"url":"\/documentation\/discogsservice\/components\/requestbodies","title":"Components.RequestBodies","role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"RequestBodies"}],"navigatorTitle":[{"kind":"identifier","text":"RequestBodies"}],"kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/RequestBodies","abstract":[{"type":"text","text":"Types generated from the "},{"type":"codeVoice","code":"#\/components\/requestBodies"},{"type":"text","text":" section of the OpenAPI document."}],"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":{"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"}}}