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
13 KiB
JSON
1 line
13 KiB
JSON
{"abstract":[{"type":"text","text":"Get information about an authenticated user."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"getUserIdentity"},{"kind":"text","text":"("},{"kind":"externalParam","text":"headers"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetUserIdentity","text":"GetUserIdentity","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetUserIdentity\/Input","text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO5InputV"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetUserIdentity\/Input\/Headers-swift.struct","text":"Headers","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO5InputV7HeadersV"},{"kind":"text","text":" = .init()) "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetUserIdentity","text":"GetUserIdentity","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetUserIdentity\/Output","text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO6OutputO"}],"platforms":["macOS"],"languages":["swift"]}]},{"content":[{"type":"heading","anchor":"discussion","level":2,"text":"Discussion"},{"type":"paragraph","inlineContent":[{"text":"Retrieve basic information about the authenticated user.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"This endpoint represents the (optional) ","type":"text"},{"identifier":"https:\/\/www.discogs.com\/developers#header-5-send-authenticated-requests-to-discogs-endpoints","isActive":true,"type":"reference"},{"text":", as it is advised to perform a sanity check to ensure the ","type":"text"},{"inlineContent":[{"type":"text","text":"OAuth"}],"type":"emphasis"},{"text":" process finished successfully.","type":"text"}]},{"type":"paragraph","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","isActive":true,"type":"reference"},{"text":" section in the ","type":"text"},{"identifier":"https:\/\/www.discogs.com\/developers#page:authentication","isActive":true,"type":"reference"},{"text":" documentation.","type":"text"}]},{"type":"aside","content":[{"inlineContent":[{"type":"text","text":"HTTP "},{"type":"codeVoice","code":"GET \/oauth\/identity"},{"type":"text","text":"."}],"type":"paragraph"}],"name":"Remark","style":"note"},{"type":"aside","content":[{"inlineContent":[{"type":"text","text":"Generated from "},{"type":"codeVoice","code":"#\/paths\/\/oauth\/identity\/get(getUserIdentity)"},{"type":"text","text":"."}],"type":"paragraph"}],"name":"Remark","style":"note"}],"kind":"content"}],"sections":[],"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client"]]},"metadata":{"extendedModule":"DiscogsService","roleHeading":"Instance Method","modules":[{"name":"DiscogsService"}],"title":"getUserIdentity(headers:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"getUserIdentity"},{"kind":"text","text":"("},{"kind":"externalParam","text":"headers"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"GetUserIdentity","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO5InputV"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Headers","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO5InputV7HeadersV"},{"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":"GetUserIdentity","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO6OutputO"}],"role":"symbol","externalID":"s:14DiscogsService11APIProtocolPAAE15getUserIdentity7headersAA10OperationsO03GeteF0O6OutputOAI5InputV7HeadersV_tYaKF::SYNTHESIZED::s:14DiscogsService6ClientV","symbolKind":"method"},"identifier":{"url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getUserIdentity(headers:)","interfaceLanguage":"swift"},"variants":[{"paths":["\/documentation\/discogsservice\/client\/getuseridentity(headers:)"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"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/GetUserIdentity/Input":{"type":"topic","url":"\/documentation\/discogsservice\/operations\/getuseridentity\/input","title":"Operations.GetUserIdentity.Input","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetUserIdentity\/Input","abstract":[],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Input"}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Input"}],"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#page:authentication":{"identifier":"https:\/\/www.discogs.com\/developers#page:authentication","type":"link","titleInlineContent":[{"type":"text","text":"Discogs API authentication"}],"url":"https:\/\/www.discogs.com\/developers#page:authentication","title":"Discogs API authentication"},"doc://DiscogsService/documentation/DiscogsService/Client/getUserIdentity(headers:)":{"url":"\/documentation\/discogsservice\/client\/getuseridentity(headers:)","type":"topic","abstract":[{"text":"Get information about an authenticated user.","type":"text"}],"role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"getUserIdentity","kind":"identifier"},{"text":"(","kind":"text"},{"text":"headers","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"text":"GetUserIdentity","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO"},{"text":".","kind":"text"},{"text":"Input","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO5InputV"},{"text":".","kind":"text"},{"text":"Headers","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO5InputV7HeadersV"},{"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"},{"preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO","kind":"typeIdentifier","text":"GetUserIdentity"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO6OutputO","kind":"typeIdentifier","text":"Output"}],"kind":"symbol","title":"getUserIdentity(headers:)","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getUserIdentity(headers:)"},"doc://DiscogsService/documentation/DiscogsService/Operations/GetUserIdentity/Input/Headers-swift.struct":{"type":"topic","title":"Operations.GetUserIdentity.Input.Headers","url":"\/documentation\/discogsservice\/operations\/getuseridentity\/input\/headers-swift.struct","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetUserIdentity\/Input\/Headers-swift.struct","abstract":[],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Headers"}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Headers"}],"kind":"symbol"},"https://www.discogs.com/developers#header-5-send-authenticated-requests-to-discogs-endpoints":{"identifier":"https:\/\/www.discogs.com\/developers#header-5-send-authenticated-requests-to-discogs-endpoints","type":"link","titleInlineContent":[{"type":"text","text":"5th step of the OAuth flow process"}],"url":"https:\/\/www.discogs.com\/developers#header-5-send-authenticated-requests-to-discogs-endpoints","title":"5th step of the OAuth flow process"},"https://www.discogs.com/developers#page:authentication,header:authentication-oauth-flow":{"identifier":"https:\/\/www.discogs.com\/developers#page:authentication,header:authentication-oauth-flow","type":"link","titleInlineContent":[{"type":"text","text":"OAuth flow"}],"url":"https:\/\/www.discogs.com\/developers#page:authentication,header:authentication-oauth-flow","title":"OAuth flow"},"doc://DiscogsService/documentation/DiscogsService/Operations/GetUserIdentity/Output":{"abstract":[],"type":"topic","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetUserIdentity\/Output","url":"\/documentation\/discogsservice\/operations\/getuseridentity\/output","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}],"kind":"symbol","title":"Operations.GetUserIdentity.Output","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Output"}]},"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"},"doc://DiscogsService/documentation/DiscogsService/Operations/GetUserIdentity":{"abstract":[{"type":"text","text":"Get information about an authenticated user."}],"type":"topic","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetUserIdentity","url":"\/documentation\/discogsservice\/operations\/getuseridentity","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"GetUserIdentity"}],"kind":"symbol","title":"Operations.GetUserIdentity","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"GetUserIdentity"}]}}} |