Files
discogs-service/docs/data/documentation/discogsservice/client/getuseridentity(headers:).json
T
javier 9a30b69561 Implemented the Authentication endpoints (#9)
This PR contains the work done to implement the *Authentication* endpoints of the Discogs API:
* GET `/oauth/request_token`
* POST `/oauth/access_token`
* GET `/oauth/identity`

Reviewed-on: #9
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-10-13 17:55:48 +00:00

1 line
13 KiB
JSON

{"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"getUserIdentity"},{"kind":"text","text":"("},{"kind":"externalParam","text":"headers"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Operations","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"GetUserIdentity","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetUserIdentity","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Input","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetUserIdentity\/Input","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO5InputV"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Headers","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetUserIdentity\/Input\/Headers-swift.struct","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO5InputV7HeadersV"},{"kind":"text","text":" = .init()) "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","text":"Operations","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"GetUserIdentity","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetUserIdentity","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Output","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetUserIdentity\/Output","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO6OutputO"}]}]},{"kind":"content","content":[{"text":"Discussion","type":"heading","level":2,"anchor":"discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Retrieve basic information about the authenticated user."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This endpoint represents the (optional) "},{"isActive":true,"type":"reference","identifier":"https:\/\/www.discogs.com\/developers#header-5-send-authenticated-requests-to-discogs-endpoints"},{"type":"text","text":", as it is advised to perform a sanity check to ensure the "},{"type":"emphasis","inlineContent":[{"type":"text","text":"OAuth"}]},{"type":"text","text":" process finished successfully."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"For further details about this process, please refer to the "},{"isActive":true,"type":"reference","identifier":"https:\/\/www.discogs.com\/developers#page:authentication,header:authentication-oauth-flow"},{"type":"text","text":" section in the "},{"isActive":true,"type":"reference","identifier":"https:\/\/www.discogs.com\/developers#page:authentication"},{"type":"text","text":" documentation."}]},{"type":"aside","style":"note","name":"Remark","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"HTTP "},{"type":"codeVoice","code":"GET \/oauth\/identity"},{"type":"text","text":"."}]}]},{"type":"aside","style":"note","name":"Remark","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Generated from "},{"type":"codeVoice","code":"#\/paths\/\/oauth\/identity\/get(getUserIdentity)"},{"type":"text","text":"."}]}]}]}],"variants":[{"paths":["\/documentation\/discogsservice\/client\/getuseridentity(headers:)"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getUserIdentity(headers:)"},"abstract":[{"text":"Get information about an authenticated user.","type":"text"}],"kind":"symbol","sections":[],"metadata":{"role":"symbol","externalID":"s:14DiscogsService11APIProtocolPAAE15getUserIdentity7headersAA10OperationsO03GeteF0O6OutputOAI5InputV7HeadersV_tYaKF::SYNTHESIZED::s:14DiscogsService6ClientV","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"getUserIdentity","kind":"identifier"},{"text":"(","kind":"text"},{"text":"headers","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"text":"GetUserIdentity","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO"},{"text":".","kind":"text"},{"text":"Input","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO5InputV"},{"text":".","kind":"text"},{"text":"Headers","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO5InputV7HeadersV"},{"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":"GetUserIdentity","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO"},{"text":".","kind":"text"},{"text":"Output","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO6OutputO"}],"symbolKind":"method","modules":[{"name":"DiscogsService"}],"title":"getUserIdentity(headers:)","roleHeading":"Instance Method","extendedModule":"DiscogsService"},"schemaVersion":{"major":0,"minor":3,"patch":0},"references":{"doc://DiscogsService/documentation/DiscogsService/Operations/GetUserIdentity/Input":{"url":"\/documentation\/discogsservice\/operations\/getuseridentity\/input","role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetUserIdentity\/Input","abstract":[],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Input"}],"kind":"symbol","title":"Operations.GetUserIdentity.Input","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Input"}]},"https://www.discogs.com/developers#page:authentication":{"title":"Discogs API authentication","identifier":"https:\/\/www.discogs.com\/developers#page:authentication","url":"https:\/\/www.discogs.com\/developers#page:authentication","titleInlineContent":[{"text":"Discogs API authentication","type":"text"}],"type":"link"},"doc://DiscogsService/documentation/DiscogsService/Operations":{"url":"\/documentation\/discogsservice\/operations","kind":"symbol","role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"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"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","navigatorTitle":[{"kind":"identifier","text":"Operations"}],"title":"Operations"},"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","url":"https:\/\/www.discogs.com\/developers#page:authentication,header:authentication-oauth-flow","titleInlineContent":[{"text":"OAuth flow","type":"text"}],"type":"link"},"doc://DiscogsService/documentation/DiscogsService/Operations/GetUserIdentity/Output":{"type":"topic","url":"\/documentation\/discogsservice\/operations\/getuseridentity\/output","kind":"symbol","title":"Operations.GetUserIdentity.Output","abstract":[],"role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetUserIdentity\/Output","navigatorTitle":[{"text":"Output","kind":"identifier"}],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Output","kind":"identifier"}]},"doc://DiscogsService/documentation/DiscogsService/Client":{"url":"\/documentation\/discogsservice\/client","role":"symbol","abstract":[{"type":"text","text":"The Discogs API v2.0 is a RESTful interface to Discogs data. You can access JSON-formatted information about Database objects such as "},{"inlineContent":[{"type":"text","text":"Artists"}],"type":"emphasis"},{"type":"text","text":", "},{"inlineContent":[{"type":"text","text":"Releases"}],"type":"emphasis"},{"type":"text","text":", and "},{"inlineContent":[{"type":"text","text":"Labels"}],"type":"emphasis"},{"type":"text","text":". Your application can also manage "},{"inlineContent":[{"type":"text","text":"User Collections"}],"type":"emphasis"},{"type":"text","text":" and "},{"inlineContent":[{"type":"text","text":"Wantlists"}],"type":"emphasis"},{"type":"text","text":", create "},{"inlineContent":[{"type":"text","text":"Marketplace"}],"type":"emphasis"},{"type":"text","text":" listings, and more."}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Client","kind":"identifier"}],"kind":"symbol","type":"topic","title":"Client","navigatorTitle":[{"text":"Client","kind":"identifier"}]},"https://www.discogs.com/developers#header-5-send-authenticated-requests-to-discogs-endpoints":{"title":"5th step of the OAuth flow process","identifier":"https:\/\/www.discogs.com\/developers#header-5-send-authenticated-requests-to-discogs-endpoints","url":"https:\/\/www.discogs.com\/developers#header-5-send-authenticated-requests-to-discogs-endpoints","titleInlineContent":[{"text":"5th step of the OAuth flow process","type":"text"}],"type":"link"},"doc://DiscogsService/documentation/DiscogsService/Operations/GetUserIdentity/Input/Headers-swift.struct":{"url":"\/documentation\/discogsservice\/operations\/getuseridentity\/input\/headers-swift.struct","role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetUserIdentity\/Input\/Headers-swift.struct","abstract":[],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"Headers","kind":"identifier"}],"kind":"symbol","type":"topic","title":"Operations.GetUserIdentity.Input.Headers","navigatorTitle":[{"text":"Headers","kind":"identifier"}]},"doc://DiscogsService/documentation/DiscogsService":{"title":"DiscogsService","abstract":[],"role":"collection","type":"topic","kind":"symbol","url":"\/documentation\/discogsservice","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService"},"doc://DiscogsService/documentation/DiscogsService/Operations/GetUserIdentity":{"url":"\/documentation\/discogsservice\/operations\/getuseridentity","role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/GetUserIdentity","abstract":[{"text":"Get information about an authenticated user.","type":"text"}],"fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"GetUserIdentity"}],"kind":"symbol","title":"Operations.GetUserIdentity","type":"topic","navigatorTitle":[{"kind":"identifier","text":"GetUserIdentity"}]},"doc://DiscogsService/documentation/DiscogsService/Client/getUserIdentity(headers:)":{"url":"\/documentation\/discogsservice\/client\/getuseridentity(headers:)","role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getUserIdentity(headers:)","abstract":[{"text":"Get information about an authenticated user.","type":"text"}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"getUserIdentity"},{"kind":"text","text":"("},{"kind":"externalParam","text":"headers"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"GetUserIdentity","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO5InputV"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Headers","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO5InputV7HeadersV"},{"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":"GetUserIdentity","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO6OutputO"}],"kind":"symbol","title":"getUserIdentity(headers:)","type":"topic"}}}