f3d5c0e6ac
This PR contains the work done to implement the *User Wantlist* endpoints of the *Discogs API* online service in the `Open API` specification document:
* GET `/users/{username}/wants`
* POST `/users/{username}/wants/{release_id}`
* PUT `/users/{username}/wants/{release_id}`
* DELETE `/users/{username}/wants/{release_id}`
Reviewed-on: #13
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
1 line
14 KiB
JSON
1 line
14 KiB
JSON
{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/postAccessToken(headers:)"},"kind":"symbol","sections":[],"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client"]]},"schemaVersion":{"major":0,"patch":0,"minor":3},"abstract":[{"type":"text","text":"Provide required credentials data to obtain an access token."}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"postAccessToken"},{"kind":"text","text":"("},{"kind":"externalParam","text":"headers"},{"kind":"text","text":": "},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier","text":"Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","text":"PostAccessToken","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV","text":"Input","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Input"},{"text":".","kind":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Input\/Headers-swift.struct","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV7HeadersV","kind":"typeIdentifier","text":"Headers"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","text":"PostAccessToken","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO","text":"Output","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Output"}],"languages":["swift"]}],"kind":"declarations"},{"content":[{"text":"Discussion","anchor":"discussion","type":"heading","level":2},{"type":"paragraph","inlineContent":[{"type":"text","text":"Provide to the service some required credentials details to obtain an access token at the end of the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"OAuth"}]},{"type":"text","text":" process."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This endpoint represents the "},{"type":"reference","isActive":true,"identifier":"https:\/\/www.discogs.com\/developers#header-4.-send-a-post-request-to-the-discogs-access-token-url"},{"type":"text","text":", thus it requires to configure an "},{"inlineContent":[{"text":"Authorization","type":"text"}],"type":"emphasis"},{"type":"text","text":" header to have a value like this:"}]},{"type":"codeListing","syntax":null,"code":["OAuth oauth_consumer_key=\"your_consumer_key\", oauth_nonce=\"random_string_or_timestamp\", oauth_token=\"oauth_token_received_from_step_2\" oauth_signature=\"your_consumer_secret&\", oauth_signature_method=\"PLAINTEXT\", oauth_timestamp=\"current_timestamp\", oauth_verifier=\"users_verifier\""]},{"inlineContent":[{"text":"For further details about this process, please refer to the ","type":"text"},{"isActive":true,"identifier":"https:\/\/www.discogs.com\/developers#page:authentication,header:authentication-oauth-flow","type":"reference"},{"text":" section in the ","type":"text"},{"isActive":true,"identifier":"https:\/\/www.discogs.com\/developers#page:authentication","type":"reference"},{"text":" documentation.","type":"text"}],"type":"paragraph"},{"style":"note","type":"aside","content":[{"inlineContent":[{"text":"HTTP ","type":"text"},{"code":"POST \/oauth\/access_token","type":"codeVoice"},{"text":".","type":"text"}],"type":"paragraph"}],"name":"Remark"},{"style":"note","type":"aside","content":[{"inlineContent":[{"text":"Generated from ","type":"text"},{"code":"#\/paths\/\/oauth\/access_token\/post(postAccessToken)","type":"codeVoice"},{"text":".","type":"text"}],"type":"paragraph"}],"name":"Remark"}],"kind":"content"}],"metadata":{"roleHeading":"Instance Method","symbolKind":"method","title":"postAccessToken(headers:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"postAccessToken"},{"kind":"text","text":"("},{"kind":"externalParam","text":"headers"},{"kind":"text","text":": "},{"preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier","text":"Operations"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","kind":"typeIdentifier","text":"PostAccessToken"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV7HeadersV","text":"Headers"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","kind":"typeIdentifier","text":"PostAccessToken"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO","kind":"typeIdentifier","text":"Output"}],"role":"symbol","modules":[{"name":"DiscogsService"}],"externalID":"s:14DiscogsService11APIProtocolPAAE15postAccessToken7headersAA10OperationsO04PosteF0O6OutputOAI5InputV7HeadersV_tYaKF::SYNTHESIZED::s:14DiscogsService6ClientV","extendedModule":"DiscogsService"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/discogsservice\/client\/postaccesstoken(headers:)"]}],"references":{"doc://DiscogsService/documentation/DiscogsService/Operations/PostAccessToken/Output":{"url":"\/documentation\/discogsservice\/operations\/postaccesstoken\/output","navigatorTitle":[{"kind":"identifier","text":"Output"}],"abstract":[],"title":"Operations.PostAccessToken.Output","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Output","role":"symbol"},"doc://DiscogsService/documentation/DiscogsService":{"title":"DiscogsService","type":"topic","url":"\/documentation\/discogsservice","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService","abstract":[],"kind":"symbol","role":"collection"},"doc://DiscogsService/documentation/DiscogsService/Operations/PostAccessToken":{"url":"\/documentation\/discogsservice\/operations\/postaccesstoken","role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"PostAccessToken"}],"type":"topic","title":"Operations.PostAccessToken","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken","abstract":[{"type":"text","text":"Provide required credentials data to obtain an access token."}],"navigatorTitle":[{"kind":"identifier","text":"PostAccessToken"}],"kind":"symbol"},"https://www.discogs.com/developers#page:authentication,header:authentication-oauth-flow":{"type":"link","titleInlineContent":[{"text":"OAuth flow","type":"text"}],"url":"https:\/\/www.discogs.com\/developers#page:authentication,header:authentication-oauth-flow","identifier":"https:\/\/www.discogs.com\/developers#page:authentication,header:authentication-oauth-flow","title":"OAuth flow"},"doc://DiscogsService/documentation/DiscogsService/Operations/PostAccessToken/Input/Headers-swift.struct":{"abstract":[],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Input\/Headers-swift.struct","type":"topic","url":"\/documentation\/discogsservice\/operations\/postaccesstoken\/input\/headers-swift.struct","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Headers","kind":"identifier"}],"kind":"symbol","title":"Operations.PostAccessToken.Input.Headers","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Headers"}]},"https://www.discogs.com/developers#page:authentication":{"type":"link","titleInlineContent":[{"text":"Discogs API authentication","type":"text"}],"url":"https:\/\/www.discogs.com\/developers#page:authentication","identifier":"https:\/\/www.discogs.com\/developers#page:authentication","title":"Discogs API authentication"},"doc://DiscogsService/documentation/DiscogsService/Client/postAccessToken(headers:)":{"kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/postAccessToken(headers:)","role":"symbol","abstract":[{"text":"Provide required credentials data to obtain an access token.","type":"text"}],"type":"topic","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"postAccessToken"},{"kind":"text","text":"("},{"kind":"externalParam","text":"headers"},{"kind":"text","text":": "},{"preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier","text":"Operations"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","kind":"typeIdentifier","text":"PostAccessToken"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV","kind":"typeIdentifier","text":"Input"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV7HeadersV","kind":"typeIdentifier","text":"Headers"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier","text":"Operations"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","kind":"typeIdentifier","text":"PostAccessToken"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO","kind":"typeIdentifier","text":"Output"}],"title":"postAccessToken(headers:)","url":"\/documentation\/discogsservice\/client\/postaccesstoken(headers:)"},"doc://DiscogsService/documentation/DiscogsService/Operations/PostAccessToken/Input":{"url":"\/documentation\/discogsservice\/operations\/postaccesstoken\/input","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Input"}],"type":"topic","title":"Operations.PostAccessToken.Input","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Input","abstract":[],"navigatorTitle":[{"text":"Input","kind":"identifier"}],"kind":"symbol"},"doc://DiscogsService/documentation/DiscogsService/Client":{"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Client"}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Client"}],"abstract":[{"type":"text","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":"emphasis","inlineContent":[{"type":"text","text":"Artists"}]},{"type":"text","text":", "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Releases"}]},{"type":"text","text":", and "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Labels"}]},{"type":"text","text":". Your application can also manage "},{"type":"emphasis","inlineContent":[{"type":"text","text":"User Collections"}]},{"type":"text","text":" and "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Wantlists"}]},{"type":"text","text":", create "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Marketplace"}]},{"type":"text","text":" listings, and more."}],"url":"\/documentation\/discogsservice\/client","title":"Client","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client","type":"topic","kind":"symbol"},"https://www.discogs.com/developers#header-4.-send-a-post-request-to-the-discogs-access-token-url":{"type":"link","titleInlineContent":[{"text":"4th step of the OAuth flow process","type":"text"}],"url":"https:\/\/www.discogs.com\/developers#header-4.-send-a-post-request-to-the-discogs-access-token-url","identifier":"https:\/\/www.discogs.com\/developers#header-4.-send-a-post-request-to-the-discogs-access-token-url","title":"4th step of the OAuth flow process"},"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","role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","url":"\/documentation\/discogsservice\/operations","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Operations","kind":"identifier"}],"navigatorTitle":[{"kind":"identifier","text":"Operations"}],"type":"topic","title":"Operations"}}} |