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
15 KiB
JSON
1 line
15 KiB
JSON
{"abstract":[{"type":"text","text":"Provide required credentials data to obtain an access token."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"postAccessToken"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"kind":"text","text":" "},{"kind":"internalParam","text":"input"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Operations","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"PostAccessToken","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Input","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Input","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV"},{"kind":"text","text":") "},{"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":"PostAccessToken","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Output","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Output","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO"}]}]},{"kind":"content","content":[{"type":"heading","level":2,"text":"Discussion","anchor":"discussion"},{"inlineContent":[{"text":"Provide to the service some required credentials details to obtain an access token at the end of the ","type":"text"},{"inlineContent":[{"text":"OAuth","type":"text"}],"type":"emphasis"},{"text":" process.","type":"text"}],"type":"paragraph"},{"inlineContent":[{"text":"This endpoint represents the ","type":"text"},{"identifier":"https:\/\/www.discogs.com\/developers#header-4.-send-a-post-request-to-the-discogs-access-token-url","type":"reference","isActive":true},{"text":", thus it requires to configure an ","type":"text"},{"inlineContent":[{"text":"Authorization","type":"text"}],"type":"emphasis"},{"text":" header to have a value like this:","type":"text"}],"type":"paragraph"},{"syntax":null,"type":"codeListing","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"},{"identifier":"https:\/\/www.discogs.com\/developers#page:authentication,header:authentication-oauth-flow","type":"reference","isActive":true},{"text":" section in the ","type":"text"},{"identifier":"https:\/\/www.discogs.com\/developers#page:authentication","type":"reference","isActive":true},{"text":" documentation.","type":"text"}],"type":"paragraph"},{"name":"Remark","content":[{"inlineContent":[{"text":"HTTP ","type":"text"},{"code":"POST \/oauth\/access_token","type":"codeVoice"},{"text":".","type":"text"}],"type":"paragraph"}],"type":"aside","style":"note"},{"name":"Remark","content":[{"inlineContent":[{"text":"Generated from ","type":"text"},{"code":"#\/paths\/\/oauth\/access_token\/post(postAccessToken)","type":"codeVoice"},{"text":".","type":"text"}],"type":"paragraph"}],"type":"aside","style":"note"}]}],"sections":[],"seeAlsoSections":[{"anchor":"Authentication-endpoints","title":"Authentication endpoints","generated":true,"identifiers":["doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getRequestToken(_:)","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getUserIdentity(_:)"]}],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client"]]},"schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"externalID":"s:14DiscogsService6ClientV15postAccessTokenyAA10OperationsO04PosteF0O6OutputOAH5InputVYaKF","title":"postAccessToken(_:)","roleHeading":"Instance Method","modules":[{"name":"DiscogsService"}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"postAccessToken"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"PostAccessToken","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV"},{"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":"PostAccessToken","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO"}],"symbolKind":"method","role":"symbol"},"identifier":{"url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/postAccessToken(_:)","interfaceLanguage":"swift"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/discogsservice\/client\/postaccesstoken(_:)"]}],"references":{"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"},"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","titleInlineContent":[{"type":"text","text":"4th step of the OAuth flow process"}],"identifier":"https:\/\/www.discogs.com\/developers#header-4.-send-a-post-request-to-the-discogs-access-token-url","url":"https:\/\/www.discogs.com\/developers#header-4.-send-a-post-request-to-the-discogs-access-token-url","type":"link"},"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"},"doc://DiscogsService/documentation/DiscogsService/Client/getRequestToken(_:)":{"url":"\/documentation\/discogsservice\/client\/getrequesttoken(_:)","abstract":[{"text":"Get details about a OAuth request token.","type":"text"}],"title":"getRequestToken(_:)","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"getRequestToken","kind":"identifier"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO","text":"GetRequestToken","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO5InputV","text":"Input","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:14DiscogsService10OperationsO15GetRequestTokenO","text":"GetRequestToken","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO6OutputO","text":"Output","kind":"typeIdentifier"}],"role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getRequestToken(_:)","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"},"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/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"},"https://www.discogs.com/developers#page:authentication":{"title":"Discogs API authentication","titleInlineContent":[{"type":"text","text":"Discogs API authentication"}],"identifier":"https:\/\/www.discogs.com\/developers#page:authentication","url":"https:\/\/www.discogs.com\/developers#page:authentication","type":"link"},"doc://DiscogsService/documentation/DiscogsService/Client/postAccessToken(_:)":{"url":"\/documentation\/discogsservice\/client\/postaccesstoken(_:)","abstract":[{"text":"Provide required credentials data to obtain an access token.","type":"text"}],"title":"postAccessToken(_:)","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"postAccessToken","kind":"identifier"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","text":"PostAccessToken","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV","text":"Input","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:14DiscogsService10OperationsO15PostAccessTokenO","text":"PostAccessToken","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO","text":"Output","kind":"typeIdentifier"}],"role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/postAccessToken(_:)","kind":"symbol"},"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/Client/getUserIdentity(_:)":{"url":"\/documentation\/discogsservice\/client\/getuseridentity(_:)","abstract":[{"text":"Get information about an authenticated user.","type":"text"}],"title":"getUserIdentity(_:)","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"getUserIdentity","kind":"identifier"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO","text":"GetUserIdentity","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO5InputV","text":"Input","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:14DiscogsService10OperationsO15GetUserIdentityO","text":"GetUserIdentity","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO6OutputO","text":"Output","kind":"typeIdentifier"}],"role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getUserIdentity(_:)","kind":"symbol"},"https://www.discogs.com/developers#page:authentication,header:authentication-oauth-flow":{"title":"OAuth flow","titleInlineContent":[{"type":"text","text":"OAuth flow"}],"identifier":"https:\/\/www.discogs.com\/developers#page:authentication,header:authentication-oauth-flow","url":"https:\/\/www.discogs.com\/developers#page:authentication,header:authentication-oauth-flow","type":"link"}}} |