63118db805
This PR contains the work done to implement the *User Lists* endpoints of the *Discogs API* service in the `Open API` specification document:
* GET `/users/{username}/lists`
* GET `/lists/{list_id}`
Reviewed-on: #14
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
1 line
20 KiB
JSON
1 line
20 KiB
JSON
{"sections":[],"kind":"symbol","seeAlsoSections":[{"generated":true,"anchor":"Authentication-endpoints","title":"Authentication endpoints","identifiers":["doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/getRequestToken(_:)","doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/getRequestToken(headers:)","doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/postAccessToken(headers:)","doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/getUserIdentity(_:)","doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/getUserIdentity(headers:)"]}],"identifier":{"url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/postAccessToken(_:)","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol"]]},"schemaVersion":{"major":0,"patch":0,"minor":3},"primaryContentSections":[{"kind":"declarations","declarations":[{"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","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken","text":"PostAccessToken","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Input","text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV"},{"kind":"text","text":") "},{"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\/PostAccessToken","text":"PostAccessToken","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Output","text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO"}],"platforms":["macOS"],"languages":["swift"]}]},{"content":[{"level":2,"anchor":"discussion","text":"Discussion","type":"heading"},{"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"},{"isActive":true,"identifier":"https:\/\/www.discogs.com\/developers#header-4.-send-a-post-request-to-the-discogs-access-token-url","type":"reference"},{"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,"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\""],"type":"codeListing"},{"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","content":[{"inlineContent":[{"text":"HTTP ","type":"text"},{"type":"codeVoice","code":"POST \/oauth\/access_token"},{"text":".","type":"text"}],"type":"paragraph"}],"name":"Remark","type":"aside"},{"style":"note","content":[{"inlineContent":[{"text":"Generated from ","type":"text"},{"type":"codeVoice","code":"#\/paths\/\/oauth\/access_token\/post(postAccessToken)"},{"text":".","type":"text"}],"type":"paragraph"}],"name":"Remark","type":"aside"}],"kind":"content"}],"metadata":{"required":true,"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"}],"roleHeading":"Instance Method","role":"symbol","externalID":"s:14DiscogsService11APIProtocolP15postAccessTokenyAA10OperationsO04PosteF0O6OutputOAH5InputVYaKF","title":"postAccessToken(_:)","symbolKind":"method","modules":[{"name":"DiscogsService"}]},"abstract":[{"text":"Provide required credentials data to obtain an access token.","type":"text"}],"variants":[{"paths":["\/documentation\/discogsservice\/apiprotocol\/postaccesstoken(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://DiscogsService/documentation/DiscogsService/Operations/PostAccessToken/Input":{"type":"topic","navigatorTitle":[{"text":"Input","kind":"identifier"}],"title":"Operations.PostAccessToken.Input","kind":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Input","kind":"identifier"}],"abstract":[],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Input","role":"symbol","url":"\/documentation\/discogsservice\/operations\/postaccesstoken\/input"},"https://www.discogs.com/developers#page:authentication,header:authentication-oauth-flow":{"titleInlineContent":[{"text":"OAuth flow","type":"text"}],"identifier":"https:\/\/www.discogs.com\/developers#page:authentication,header:authentication-oauth-flow","title":"OAuth flow","url":"https:\/\/www.discogs.com\/developers#page:authentication,header:authentication-oauth-flow","type":"link"},"doc://DiscogsService/documentation/DiscogsService/APIProtocol/getRequestToken(headers:)":{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/getRequestToken(headers:)","kind":"symbol","abstract":[{"type":"text","text":"Get details about a OAuth request token."}],"title":"getRequestToken(headers:)","role":"symbol","url":"\/documentation\/discogsservice\/apiprotocol\/getrequesttoken(headers:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"getRequestToken","kind":"identifier"},{"text":"(","kind":"text"},{"text":"headers","kind":"externalParam"},{"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"},{"preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO5InputV7HeadersV","text":"Headers","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier","text":"Operations"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO","kind":"typeIdentifier","text":"GetRequestToken"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO6OutputO","kind":"typeIdentifier","text":"Output"}],"type":"topic"},"doc://DiscogsService/documentation/DiscogsService/APIProtocol/getUserIdentity(_:)":{"url":"\/documentation\/discogsservice\/apiprotocol\/getuseridentity(_:)","abstract":[{"type":"text","text":"Get information about an authenticated user."}],"title":"getUserIdentity(_:)","type":"topic","required":true,"role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/getUserIdentity(_:)","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"getUserIdentity"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO","text":"GetUserIdentity"},{"kind":"text","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"},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO6OutputO","text":"Output"}]},"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","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","type":"link","titleInlineContent":[{"type":"text","text":"4th step of the OAuth flow process"}]},"doc://DiscogsService/documentation/DiscogsService/APIProtocol/getUserIdentity(headers:)":{"url":"\/documentation\/discogsservice\/apiprotocol\/getuseridentity(headers:)","abstract":[{"type":"text","text":"Get information about an authenticated user."}],"title":"getUserIdentity(headers:)","type":"topic","role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/getUserIdentity(headers:)","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"getUserIdentity"},{"kind":"text","text":"("},{"kind":"externalParam","text":"headers"},{"kind":"text","text":": "},{"preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier","text":"Operations"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO","kind":"typeIdentifier","text":"GetUserIdentity"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO5InputV","kind":"typeIdentifier","text":"Input"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO5InputV7HeadersV","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:14DiscogsService10OperationsO15GetUserIdentityO","kind":"typeIdentifier","text":"GetUserIdentity"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO6OutputO","kind":"typeIdentifier","text":"Output"}]},"doc://DiscogsService/documentation/DiscogsService/Operations/PostAccessToken":{"type":"topic","navigatorTitle":[{"text":"PostAccessToken","kind":"identifier"}],"url":"\/documentation\/discogsservice\/operations\/postaccesstoken","abstract":[{"text":"Provide required credentials data to obtain an access token.","type":"text"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"PostAccessToken","kind":"identifier"}],"role":"symbol","kind":"symbol","title":"Operations.PostAccessToken"},"doc://DiscogsService/documentation/DiscogsService/APIProtocol/postAccessToken(_:)":{"url":"\/documentation\/discogsservice\/apiprotocol\/postaccesstoken(_:)","role":"symbol","required":true,"abstract":[{"text":"Provide required credentials data to obtain an access token.","type":"text"}],"title":"postAccessToken(_:)","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"postAccessToken"},{"text":"(","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","text":"PostAccessToken"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV","text":"Input"},{"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":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","text":"PostAccessToken"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO","kind":"typeIdentifier","text":"Output"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/postAccessToken(_:)"},"doc://DiscogsService/documentation/DiscogsService/APIProtocol/getRequestToken(_:)":{"kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/getRequestToken(_:)","required":true,"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"getRequestToken"},{"kind":"text","text":"("},{"preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier","text":"Operations"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO","kind":"typeIdentifier","text":"GetRequestToken"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO5InputV","kind":"typeIdentifier","text":"Input"},{"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:14DiscogsService10OperationsO15GetRequestTokenO","kind":"typeIdentifier","text":"GetRequestToken"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO6OutputO","kind":"typeIdentifier","text":"Output"}],"role":"symbol","type":"topic","title":"getRequestToken(_:)","abstract":[{"type":"text","text":"Get details about a OAuth request token."}],"url":"\/documentation\/discogsservice\/apiprotocol\/getrequesttoken(_:)"},"doc://DiscogsService/documentation/DiscogsService/APIProtocol/postAccessToken(headers:)":{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/postAccessToken(headers:)","role":"symbol","abstract":[{"type":"text","text":"Provide required credentials data to obtain an access token."}],"title":"postAccessToken(headers:)","type":"topic","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"postAccessToken"},{"kind":"text","text":"("},{"kind":"externalParam","text":"headers"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","text":"PostAccessToken"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV","text":"Input"},{"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":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","text":"PostAccessToken"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO","text":"Output"}],"url":"\/documentation\/discogsservice\/apiprotocol\/postaccesstoken(headers:)"},"doc://DiscogsService/documentation/DiscogsService/APIProtocol":{"url":"\/documentation\/discogsservice\/apiprotocol","kind":"symbol","abstract":[{"text":"A type that performs HTTP operations defined by the OpenAPI document.","type":"text"}],"type":"topic","role":"symbol","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"APIProtocol","kind":"identifier"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol","navigatorTitle":[{"text":"APIProtocol","kind":"identifier"}],"title":"APIProtocol"},"doc://DiscogsService/documentation/DiscogsService":{"url":"\/documentation\/discogsservice","role":"collection","abstract":[],"title":"DiscogsService","type":"topic","kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService"},"doc://DiscogsService/documentation/DiscogsService/Operations":{"kind":"symbol","navigatorTitle":[{"text":"Operations","kind":"identifier"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Operations","kind":"identifier"}],"role":"symbol","type":"topic","title":"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"}],"url":"\/documentation\/discogsservice\/operations"},"https://www.discogs.com/developers#page:authentication":{"url":"https:\/\/www.discogs.com\/developers#page:authentication","identifier":"https:\/\/www.discogs.com\/developers#page:authentication","title":"Discogs API authentication","type":"link","titleInlineContent":[{"text":"Discogs API authentication","type":"text"}]},"doc://DiscogsService/documentation/DiscogsService/Operations/PostAccessToken/Output":{"url":"\/documentation\/discogsservice\/operations\/postaccesstoken\/output","kind":"symbol","abstract":[],"type":"topic","role":"symbol","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Output","kind":"identifier"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Output","navigatorTitle":[{"text":"Output","kind":"identifier"}],"title":"Operations.PostAccessToken.Output"}}} |