Files
discogs-service/docs/data/documentation/discogsservice/client/getrequesttoken(_:).json
T
javier 63118db805 Implemented the User Lists endpoints (#14)
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>
2025-10-16 17:33:15 +00:00

1 line
15 KiB
JSON

{"sections":[],"kind":"symbol","seeAlsoSections":[{"generated":true,"anchor":"Authentication-endpoints","title":"Authentication endpoints","identifiers":["doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/postAccessToken(_:)","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getUserIdentity(_:)"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getRequestToken(_:)"},"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"getRequestToken"},{"kind":"text","text":"("},{"kind":"externalParam","text":"_"},{"text":" ","kind":"text"},{"kind":"internalParam","text":"input"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"GetRequestToken","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetRequestToken"},{"text":".","kind":"text"},{"text":"Input","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetRequestToken\/Input","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO5InputV"},{"kind":"text","text":") "},{"text":"async","kind":"keyword"},{"text":" ","kind":"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\/GetRequestToken","text":"GetRequestToken","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO6OutputO","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetRequestToken\/Output"}]}]},{"content":[{"type":"heading","text":"Discussion","anchor":"discussion","level":2},{"type":"paragraph","inlineContent":[{"text":"Retrieve a request token to initialize an ","type":"text"},{"type":"emphasis","inlineContent":[{"text":"OAuth","type":"text"}]},{"text":" authentication process.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"This endpoint represents the ","type":"text"},{"identifier":"https:\/\/www.discogs.com\/developers#header-2.-send-a-get-request-to-the-discogs-request-token-url","type":"reference","isActive":true},{"text":", thus it requires to configure an ","type":"text"},{"type":"emphasis","inlineContent":[{"text":"Authorization","type":"text"}]},{"text":" header to have a value like this:","type":"text"}]},{"type":"codeListing","syntax":null,"code":["OAuth oauth_consumer_key=\"your_consumer_key\", oauth_nonce=\"random_string_or_timestamp\", oauth_signature=\"your_consumer_secret&\", oauth_signature_method=\"PLAINTEXT\", oauth_timestamp=\"current_timestamp\", oauth_callback=\"your_callback\""]},{"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","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":"aside","name":"Remark","content":[{"type":"paragraph","inlineContent":[{"text":"HTTP ","type":"text"},{"type":"codeVoice","code":"GET \/oauth\/request_token"},{"text":".","type":"text"}]}],"style":"note"},{"type":"aside","name":"Remark","content":[{"type":"paragraph","inlineContent":[{"text":"Generated from ","type":"text"},{"type":"codeVoice","code":"#\/paths\/\/oauth\/request_token\/get(getRequestToken)"},{"text":".","type":"text"}]}],"style":"note"}],"kind":"content"}],"metadata":{"fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"getRequestToken","kind":"identifier"},{"text":"(","kind":"text"},{"text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"GetRequestToken","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO5InputV","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"GetRequestToken","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Output","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO6OutputO"}],"roleHeading":"Instance Method","role":"symbol","externalID":"s:14DiscogsService6ClientV15getRequestTokenyAA10OperationsO03GeteF0O6OutputOAH5InputVYaKF","title":"getRequestToken(_:)","symbolKind":"method","modules":[{"name":"DiscogsService"}]},"abstract":[{"text":"Get details about a OAuth request token.","type":"text"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/discogsservice\/client\/getrequesttoken(_:)"]}],"references":{"https://www.discogs.com/developers#page:authentication":{"titleInlineContent":[{"type":"text","text":"Discogs API authentication"}],"url":"https:\/\/www.discogs.com\/developers#page:authentication","title":"Discogs API authentication","identifier":"https:\/\/www.discogs.com\/developers#page:authentication","type":"link"},"https://www.discogs.com/developers#header-2.-send-a-get-request-to-the-discogs-request-token-url":{"titleInlineContent":[{"type":"text","text":"2nd step of the OAuth flow process"}],"url":"https:\/\/www.discogs.com\/developers#header-2.-send-a-get-request-to-the-discogs-request-token-url","title":"2nd step of the OAuth flow process","identifier":"https:\/\/www.discogs.com\/developers#header-2.-send-a-get-request-to-the-discogs-request-token-url","type":"link"},"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/GetRequestToken/Input":{"kind":"symbol","navigatorTitle":[{"text":"Input","kind":"identifier"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetRequestToken\/Input","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"Input","kind":"identifier"}],"role":"symbol","type":"topic","title":"Operations.GetRequestToken.Input","abstract":[],"url":"\/documentation\/discogsservice\/operations\/getrequesttoken\/input"},"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"},"doc://DiscogsService/documentation/DiscogsService/Client":{"type":"topic","navigatorTitle":[{"text":"Client","kind":"identifier"}],"title":"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"},{"inlineContent":[{"text":"Artists","type":"text"}],"type":"emphasis"},{"text":", ","type":"text"},{"inlineContent":[{"text":"Releases","type":"text"}],"type":"emphasis"},{"text":", and ","type":"text"},{"inlineContent":[{"text":"Labels","type":"text"}],"type":"emphasis"},{"text":". Your application can also manage ","type":"text"},{"inlineContent":[{"type":"text","text":"User Collections"}],"type":"emphasis"},{"text":" and ","type":"text"},{"inlineContent":[{"text":"Wantlists","type":"text"}],"type":"emphasis"},{"type":"text","text":", create "},{"type":"emphasis","inlineContent":[{"text":"Marketplace","type":"text"}]},{"type":"text","text":" listings, and more."}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client","role":"symbol","url":"\/documentation\/discogsservice\/client"},"doc://DiscogsService/documentation/DiscogsService/Operations/GetRequestToken":{"kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"GetRequestToken"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetRequestToken","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"GetRequestToken"}],"role":"symbol","type":"topic","title":"Operations.GetRequestToken","abstract":[{"text":"Get details about a OAuth request token.","type":"text"}],"url":"\/documentation\/discogsservice\/operations\/getrequesttoken"},"doc://DiscogsService/documentation/DiscogsService/Client/getRequestToken(_:)":{"type":"topic","url":"\/documentation\/discogsservice\/client\/getrequesttoken(_:)","abstract":[{"type":"text","text":"Get details about a OAuth request token."}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getRequestToken(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"getRequestToken"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"GetRequestToken","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO5InputV"},{"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":"GetRequestToken","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO6OutputO"}],"role":"symbol","kind":"symbol","title":"getRequestToken(_:)"},"https://www.discogs.com/developers#page:authentication,header:authentication-oauth-flow":{"titleInlineContent":[{"type":"text","text":"OAuth flow"}],"url":"https:\/\/www.discogs.com\/developers#page:authentication,header:authentication-oauth-flow","title":"OAuth flow","identifier":"https:\/\/www.discogs.com\/developers#page:authentication,header:authentication-oauth-flow","type":"link"},"doc://DiscogsService/documentation/DiscogsService/Operations/GetRequestToken/Output":{"url":"\/documentation\/discogsservice\/operations\/getrequesttoken\/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\/GetRequestToken\/Output","navigatorTitle":[{"text":"Output","kind":"identifier"}],"title":"Operations.GetRequestToken.Output"},"doc://DiscogsService/documentation/DiscogsService/Client/postAccessToken(_:)":{"type":"topic","url":"\/documentation\/discogsservice\/client\/postaccesstoken(_:)","abstract":[{"type":"text","text":"Provide required credentials data to obtain an access token."}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/postAccessToken(_:)","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"}],"role":"symbol","kind":"symbol","title":"postAccessToken(_:)"},"doc://DiscogsService/documentation/DiscogsService/Client/getUserIdentity(_:)":{"type":"topic","url":"\/documentation\/discogsservice\/client\/getuseridentity(_:)","abstract":[{"type":"text","text":"Get information about an authenticated user."}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getUserIdentity(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"getUserIdentity"},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"GetUserIdentity","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO5InputV"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"kind":"typeIdentifier","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"text":"GetUserIdentity","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO6OutputO"}],"role":"symbol","kind":"symbol","title":"getUserIdentity(_:)"}}}