Files
discogs-service/docs/data/documentation/discogsservice/client/postaccesstoken(headers:).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
14 KiB
JSON

{"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client"]]},"abstract":[{"text":"Provide required credentials data to obtain an access token.","type":"text"}],"kind":"symbol","identifier":{"interfaceLanguage":"swift","url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/postAccessToken(headers:)"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"postAccessToken","kind":"identifier"},{"text":"(","kind":"text"},{"text":"headers","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations"},{"text":".","kind":"text"},{"text":"PostAccessToken","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken"},{"text":".","kind":"text"},{"text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV","kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Input"},{"text":".","kind":"text"},{"text":"Headers","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV7HeadersV","kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Input\/Headers-swift.struct"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations"},{"text":".","kind":"text"},{"text":"PostAccessToken","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken"},{"text":".","kind":"text"},{"text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO","kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Output"}],"languages":["swift"]}]},{"kind":"content","content":[{"level":2,"text":"Discussion","anchor":"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"},{"identifier":"https:\/\/www.discogs.com\/developers#header-4.-send-a-post-request-to-the-discogs-access-token-url","isActive":true,"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"},{"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","syntax":null},{"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":"paragraph"},{"style":"note","name":"Remark","content":[{"inlineContent":[{"text":"HTTP ","type":"text"},{"code":"POST \/oauth\/access_token","type":"codeVoice"},{"text":".","type":"text"}],"type":"paragraph"}],"type":"aside"},{"name":"Remark","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Generated from "},{"type":"codeVoice","code":"#\/paths\/\/oauth\/access_token\/post(postAccessToken)"},{"type":"text","text":"."}]}],"type":"aside","style":"note"}]}],"schemaVersion":{"major":0,"patch":0,"minor":3},"variants":[{"paths":["\/documentation\/discogsservice\/client\/postaccesstoken(headers:)"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"metadata":{"extendedModule":"DiscogsService","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"postAccessToken","kind":"identifier"},{"text":"(","kind":"text"},{"text":"headers","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"text":"PostAccessToken","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO"},{"text":".","kind":"text"},{"text":"Input","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV"},{"text":".","kind":"text"},{"text":"Headers","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV7HeadersV"},{"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"},{"text":"PostAccessToken","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO"},{"text":".","kind":"text"},{"text":"Output","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO"}],"roleHeading":"Instance Method","title":"postAccessToken(headers:)","role":"symbol","symbolKind":"method","modules":[{"name":"DiscogsService"}],"externalID":"s:14DiscogsService11APIProtocolPAAE15postAccessToken7headersAA10OperationsO04PosteF0O6OutputOAI5InputV7HeadersV_tYaKF::SYNTHESIZED::s:14DiscogsService6ClientV"},"references":{"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":{"url":"\/documentation\/discogsservice","abstract":[],"kind":"symbol","type":"topic","title":"DiscogsService","role":"collection","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService"},"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#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","url":"https:\/\/www.discogs.com\/developers#header-4.-send-a-post-request-to-the-discogs-access-token-url","titleInlineContent":[{"text":"4th step of the OAuth flow process","type":"text"}]},"https://www.discogs.com/developers#page:authentication":{"identifier":"https:\/\/www.discogs.com\/developers#page:authentication","title":"Discogs API authentication","type":"link","url":"https:\/\/www.discogs.com\/developers#page:authentication","titleInlineContent":[{"text":"Discogs API authentication","type":"text"}]},"https://www.discogs.com/developers#page:authentication,header:authentication-oauth-flow":{"identifier":"https:\/\/www.discogs.com\/developers#page:authentication,header:authentication-oauth-flow","title":"OAuth flow","type":"link","url":"https:\/\/www.discogs.com\/developers#page:authentication,header:authentication-oauth-flow","titleInlineContent":[{"text":"OAuth flow","type":"text"}]},"doc://DiscogsService/documentation/DiscogsService/Operations/PostAccessToken/Input/Headers-swift.struct":{"role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Headers","kind":"identifier"}],"kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Input\/Headers-swift.struct","abstract":[],"url":"\/documentation\/discogsservice\/operations\/postaccesstoken\/input\/headers-swift.struct","navigatorTitle":[{"text":"Headers","kind":"identifier"}],"type":"topic","title":"Operations.PostAccessToken.Input.Headers"},"doc://DiscogsService/documentation/DiscogsService/Client/postAccessToken(headers:)":{"type":"topic","title":"postAccessToken(headers:)","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/postAccessToken(headers:)","url":"\/documentation\/discogsservice\/client\/postaccesstoken(headers:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"postAccessToken","kind":"identifier"},{"text":"(","kind":"text"},{"text":"headers","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"text":"PostAccessToken","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO"},{"text":".","kind":"text"},{"text":"Input","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV"},{"text":".","kind":"text"},{"text":"Headers","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV7HeadersV"},{"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"},{"text":"PostAccessToken","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO"},{"text":".","kind":"text"},{"text":"Output","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO"}],"kind":"symbol","role":"symbol","abstract":[{"type":"text","text":"Provide required credentials data to obtain an access token."}]},"doc://DiscogsService/documentation/DiscogsService/Operations/PostAccessToken":{"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"PostAccessToken"}],"title":"Operations.PostAccessToken","abstract":[{"text":"Provide required credentials data to obtain an access token.","type":"text"}],"kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken","role":"symbol","navigatorTitle":[{"text":"PostAccessToken","kind":"identifier"}],"type":"topic","url":"\/documentation\/discogsservice\/operations\/postaccesstoken"},"doc://DiscogsService/documentation/DiscogsService/Operations/PostAccessToken/Output":{"abstract":[],"title":"Operations.PostAccessToken.Output","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Output","kind":"identifier"}],"role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Output","url":"\/documentation\/discogsservice\/operations\/postaccesstoken\/output","navigatorTitle":[{"text":"Output","kind":"identifier"}],"type":"topic","kind":"symbol"},"doc://DiscogsService/documentation/DiscogsService/Operations/PostAccessToken/Input":{"url":"\/documentation\/discogsservice\/operations\/postaccesstoken\/input","navigatorTitle":[{"text":"Input","kind":"identifier"}],"type":"topic","kind":"symbol","abstract":[],"title":"Operations.PostAccessToken.Input","role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Input","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Input","kind":"identifier"}]}}}