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