1 line
14 KiB
JSON
1 line
14 KiB
JSON
{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/discogsservice\/client\/postaccesstoken(headers:)"]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"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","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","text":"PostAccessToken","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV","text":"Input","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Input"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV7HeadersV","text":"Headers","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Input\/Headers-swift.struct"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","text":"PostAccessToken","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO","text":"Output","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Output"}],"platforms":["macOS"],"languages":["swift"]}]},{"kind":"content","content":[{"text":"Discussion","anchor":"discussion","type":"heading","level":2},{"type":"paragraph","inlineContent":[{"type":"text","text":"Provide to the service some required credentials details to obtain an access token at the end of the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"OAuth"}]},{"type":"text","text":" process."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This endpoint represents the "},{"identifier":"https:\/\/www.discogs.com\/developers#header-4.-send-a-post-request-to-the-discogs-access-token-url","isActive":true,"type":"reference"},{"type":"text","text":", thus it requires to configure an "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Authorization"}]},{"type":"text","text":" header to have a value like this:"}]},{"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},{"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","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"}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"HTTP "},{"code":"POST \/oauth\/access_token","type":"codeVoice"},{"type":"text","text":"."}]}],"type":"aside","name":"Remark","style":"note"},{"content":[{"inlineContent":[{"text":"Generated from ","type":"text"},{"type":"codeVoice","code":"#\/paths\/\/oauth\/access_token\/post(postAccessToken)"},{"text":".","type":"text"}],"type":"paragraph"}],"type":"aside","name":"Remark","style":"note"}]}],"kind":"symbol","abstract":[{"type":"text","text":"Provide required credentials data to obtain an access token."}],"metadata":{"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","text":"Operations","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","text":"PostAccessToken","kind":"typeIdentifier"},{"text":".","kind":"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"},{"text":" -> ","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","text":"PostAccessToken","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO","text":"Output","kind":"typeIdentifier"}],"role":"symbol","externalID":"s:14DiscogsService11APIProtocolPAAE15postAccessToken7headersAA10OperationsO04PosteF0O6OutputOAI5InputV7HeadersV_tYaKF::SYNTHESIZED::s:14DiscogsService6ClientV","extendedModule":"DiscogsService","symbolKind":"method","title":"postAccessToken(headers:)","roleHeading":"Instance Method","modules":[{"name":"DiscogsService"}]},"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/postAccessToken(headers:)"},"references":{"doc://DiscogsService/documentation/DiscogsService/Operations/PostAccessToken/Input/Headers-swift.struct":{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Input\/Headers-swift.struct","kind":"symbol","role":"symbol","type":"topic","title":"Operations.PostAccessToken.Input.Headers","abstract":[],"url":"\/documentation\/discogsservice\/operations\/postaccesstoken\/input\/headers-swift.struct","navigatorTitle":[{"kind":"identifier","text":"Headers"}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Headers"}]},"doc://DiscogsService/documentation/DiscogsService":{"role":"collection","type":"topic","title":"DiscogsService","kind":"symbol","url":"\/documentation\/discogsservice","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService","abstract":[{"type":"text","text":"A Swift client library for the Discogs API, built on top of Swift OpenAPI."}]},"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","titleInlineContent":[{"type":"text","text":"4th step of the OAuth flow process"}],"url":"https:\/\/www.discogs.com\/developers#header-4.-send-a-post-request-to-the-discogs-access-token-url","type":"link"},"doc://DiscogsService/documentation/DiscogsService/Operations/PostAccessToken":{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken","kind":"symbol","role":"symbol","type":"topic","title":"Operations.PostAccessToken","abstract":[{"type":"text","text":"Provide required credentials data to obtain an access token."}],"url":"\/documentation\/discogsservice\/operations\/postaccesstoken","navigatorTitle":[{"text":"PostAccessToken","kind":"identifier"}],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"PostAccessToken","kind":"identifier"}]},"doc://DiscogsService/documentation/DiscogsService/Client":{"url":"\/documentation\/discogsservice\/client","navigatorTitle":[{"kind":"identifier","text":"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"},{"type":"emphasis","inlineContent":[{"type":"text","text":"Artists"}]},{"type":"text","text":", "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Releases"}]},{"text":", and ","type":"text"},{"inlineContent":[{"type":"text","text":"Labels"}],"type":"emphasis"},{"text":". Your application can also manage ","type":"text"},{"inlineContent":[{"type":"text","text":"User Collections"}],"type":"emphasis"},{"type":"text","text":" and "},{"type":"emphasis","inlineContent":[{"text":"Wantlists","type":"text"}]},{"type":"text","text":", create "},{"type":"emphasis","inlineContent":[{"type":"text","text":"Marketplace"}]},{"type":"text","text":" listings, and more."}],"title":"Client","kind":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Client"}],"type":"topic","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client","role":"symbol"},"doc://DiscogsService/documentation/DiscogsService/Operations/PostAccessToken/Input":{"title":"Operations.PostAccessToken.Input","type":"topic","url":"\/documentation\/discogsservice\/operations\/postaccesstoken\/input","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Input","kind":"identifier"}],"navigatorTitle":[{"text":"Input","kind":"identifier"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Input","kind":"symbol","abstract":[],"role":"symbol"},"doc://DiscogsService/documentation/DiscogsService/Operations":{"url":"\/documentation\/discogsservice\/operations","abstract":[{"text":"API operations, with input and output types, generated from ","type":"text"},{"code":"#\/paths","type":"codeVoice"},{"type":"text","text":" in the OpenAPI document."}],"navigatorTitle":[{"text":"Operations","kind":"identifier"}],"role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"text":"Operations","kind":"identifier"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","kind":"symbol","type":"topic","title":"Operations"},"doc://DiscogsService/documentation/DiscogsService/Client/postAccessToken(headers:)":{"title":"postAccessToken(headers:)","type":"topic","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"},{"preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","text":"PostAccessToken","kind":"typeIdentifier"},{"text":".","kind":"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"},{"text":" -> ","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","text":"PostAccessToken","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO","text":"Output","kind":"typeIdentifier"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/postAccessToken(headers:)","kind":"symbol","abstract":[{"type":"text","text":"Provide required credentials data to obtain an access token."}],"role":"symbol"},"doc://DiscogsService/documentation/DiscogsService/Operations/PostAccessToken/Output":{"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Output","kind":"identifier"}],"type":"topic","navigatorTitle":[{"text":"Output","kind":"identifier"}],"role":"symbol","kind":"symbol","abstract":[],"title":"Operations.PostAccessToken.Output","url":"\/documentation\/discogsservice\/operations\/postaccesstoken\/output","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Output"},"https://www.discogs.com/developers#page:authentication":{"identifier":"https:\/\/www.discogs.com\/developers#page:authentication","title":"Discogs API authentication","titleInlineContent":[{"text":"Discogs API authentication","type":"text"}],"url":"https:\/\/www.discogs.com\/developers#page:authentication","type":"link"},"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","titleInlineContent":[{"text":"OAuth flow","type":"text"}],"url":"https:\/\/www.discogs.com\/developers#page:authentication,header:authentication-oauth-flow","type":"link"}}} |