Files
discogs-service/docs/data/documentation/discogsservice/client/getrequesttoken(_:).json
T
javier 2a7b9746a7 Implemented the User Collection endpoints (#12)
This PR contains the work done to implement the *User Collection* endpoints of the Discogs API into the `OpenAPI` specification document:

* GET `/users/{username}/collection/folders`
* POST `/users/{username}/collection/folders`
* GET `/users/{username}/collection/folders/{folder_id}`
* POST `/users/{username}/collection/folders/{folder_id}`
* DELETE `/users/{username}/collection/folders/{folder_id}`
* GET `/users/{username}/collection/releases/{release_id}`
* GET `/users/{username}/collection/folders/{folder_id}/releases`
* POST `/users/{username}/collection/folders/{folder_id}/releases/{release_id}`
* POST `/users/{username}/collection/folders/{folder_id}/releases/{release_id}/instances/{instance_id}`
* DELETE `/users/{username}/collection/folders/{folder_id}/releases/{release_id}/instances/{instance_id}`
* GET `/users/{username}/collection/fields`
* POST `/users/{username}/collection/folders/{folder_id}/releases/{release_id}/instances/{instance_id}/fields/{field_id}`
* GET `/users/{username}/collection/value`

Reviewed-on: #12
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-10-16 14:38:41 +00:00

1 line
15 KiB
JSON

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