bfc9e67d38
This PR contains the work done to implement the `AuthMiddleware` middleware, to authenticate the requests sent to the backend service, based on [their specifications](https://www.discogs.com/developers/#page:authentication). In addition, some documentation has been added/updated and some boilerplate source code has been removed from the project. Reviewed-on: #3 Co-authored-by: Javier Cicchelli <javier@rock-n-code.com> Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
1 line
14 KiB
JSON
1 line
14 KiB
JSON
{"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/discogsservice\/client\/getartist(path:headers:)"]}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"getArtist","kind":"identifier"},{"text":"(","kind":"text"},{"text":"path","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Operations","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"text":"getArtist","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getArtist","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO9getArtistO"},{"text":".","kind":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getArtist\/Input","preciseIdentifier":"s:14DiscogsService10OperationsO9getArtistO5InputV","text":"Input","kind":"typeIdentifier"},{"text":".","kind":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getArtist\/Input\/Path-swift.struct","preciseIdentifier":"s:14DiscogsService10OperationsO9getArtistO5InputV4PathV","text":"Path","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"headers","kind":"externalParam"},{"text":": ","kind":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier","text":"Operations"},{"kind":"text","text":"."},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getArtist","preciseIdentifier":"s:14DiscogsService10OperationsO9getArtistO","kind":"typeIdentifier","text":"getArtist"},{"text":".","kind":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getArtist\/Input","preciseIdentifier":"s:14DiscogsService10OperationsO9getArtistO5InputV","text":"Input","kind":"typeIdentifier"},{"text":".","kind":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getArtist\/Input\/Headers-swift.struct","preciseIdentifier":"s:14DiscogsService10OperationsO9getArtistO5InputV7HeadersV","text":"Headers","kind":"typeIdentifier"},{"text":" = .init()) ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations","kind":"typeIdentifier"},{"text":".","kind":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getArtist","preciseIdentifier":"s:14DiscogsService10OperationsO9getArtistO","text":"getArtist","kind":"typeIdentifier"},{"text":".","kind":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getArtist\/Output","preciseIdentifier":"s:14DiscogsService10OperationsO9getArtistO6OutputO","text":"Output","kind":"typeIdentifier"}],"languages":["swift"]}],"kind":"declarations"},{"content":[{"anchor":"discussion","type":"heading","level":2,"text":"Discussion"},{"type":"paragraph","inlineContent":[{"text":"Retrieves any available information for a specific artist.","type":"text"}]},{"content":[{"inlineContent":[{"type":"text","text":"HTTP "},{"type":"codeVoice","code":"GET \/artists\/{artist_id}"},{"type":"text","text":"."}],"type":"paragraph"}],"style":"note","type":"aside","name":"Remark"},{"content":[{"inlineContent":[{"type":"text","text":"Generated from "},{"type":"codeVoice","code":"#\/paths\/\/artists\/{artist_id}\/get(getArtist)"},{"type":"text","text":"."}],"type":"paragraph"}],"style":"note","type":"aside","name":"Remark"}],"kind":"content"}],"metadata":{"extendedModule":"DiscogsService","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"getArtist","kind":"identifier"},{"kind":"text","text":"("},{"kind":"externalParam","text":"path"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO9getArtistO","text":"getArtist","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO9getArtistO5InputV"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO9getArtistO5InputV4PathV","kind":"typeIdentifier","text":"Path"},{"kind":"text","text":", "},{"text":"headers","kind":"externalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"getArtist","preciseIdentifier":"s:14DiscogsService10OperationsO9getArtistO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO9getArtistO5InputV"},{"text":".","kind":"text"},{"text":"Headers","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO9getArtistO5InputV7HeadersV"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"},{"kind":"text","text":" -> "},{"text":"Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"getArtist","preciseIdentifier":"s:14DiscogsService10OperationsO9getArtistO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO9getArtistO6OutputO"}],"title":"getArtist(path:headers:)","externalID":"s:14DiscogsService11APIProtocolPAAE9getArtist4path7headersAA10OperationsOADO6OutputOAI5InputV4PathV_AM7HeadersVtYaKF::SYNTHESIZED::s:14DiscogsService6ClientV","modules":[{"name":"DiscogsService"}],"roleHeading":"Instance Method","symbolKind":"method"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getArtist(path:headers:)"},"schemaVersion":{"patch":0,"major":0,"minor":3},"sections":[],"kind":"symbol","abstract":[{"type":"text","text":"Get information about an artist."}],"references":{"doc://DiscogsService/documentation/DiscogsService/Operations/getArtist/Output":{"fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Output"}],"title":"Operations.getArtist.Output","kind":"symbol","abstract":[],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getArtist\/Output","type":"topic","url":"\/documentation\/discogsservice\/operations\/getartist\/output"},"doc://DiscogsService/documentation/DiscogsService":{"role":"collection","title":"DiscogsService","kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService","abstract":[],"type":"topic","url":"\/documentation\/discogsservice"},"doc://DiscogsService/documentation/DiscogsService/Client":{"role":"symbol","type":"topic","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 "},{"type":"emphasis","inlineContent":[{"text":"Artists","type":"text"}]},{"type":"text","text":", "},{"type":"emphasis","inlineContent":[{"text":"Releases","type":"text"}]},{"type":"text","text":", and "},{"type":"emphasis","inlineContent":[{"text":"Labels","type":"text"}]},{"type":"text","text":". Your application can also manage "},{"type":"emphasis","inlineContent":[{"text":"User Collections","type":"text"}]},{"type":"text","text":" and "},{"type":"emphasis","inlineContent":[{"text":"Wantlists","type":"text"}]},{"type":"text","text":", create "},{"type":"emphasis","inlineContent":[{"text":"Marketplace","type":"text"}]},{"type":"text","text":" listings, and more."}],"kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client","url":"\/documentation\/discogsservice\/client","navigatorTitle":[{"text":"Client","kind":"identifier"}],"title":"Client","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Client","kind":"identifier"}]},"doc://DiscogsService/documentation/DiscogsService/Operations/getArtist/Input/Headers-swift.struct":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Headers"}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Headers"}],"title":"Operations.getArtist.Input.Headers","kind":"symbol","abstract":[],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getArtist\/Input\/Headers-swift.struct","type":"topic","url":"\/documentation\/discogsservice\/operations\/getartist\/input\/headers-swift.struct"},"doc://DiscogsService/documentation/DiscogsService/Operations/getArtist/Input/Path-swift.struct":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Path"}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Path"}],"title":"Operations.getArtist.Input.Path","kind":"symbol","abstract":[],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getArtist\/Input\/Path-swift.struct","type":"topic","url":"\/documentation\/discogsservice\/operations\/getartist\/input\/path-swift.struct"},"doc://DiscogsService/documentation/DiscogsService/Client/getArtist(path:headers:)":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"getArtist"},{"kind":"text","text":"("},{"kind":"externalParam","text":"path"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO9getArtistO","text":"getArtist"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO9getArtistO5InputV","text":"Input"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO9getArtistO5InputV4PathV","text":"Path"},{"kind":"text","text":", "},{"kind":"externalParam","text":"headers"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO9getArtistO","text":"getArtist"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO9getArtistO5InputV","text":"Input"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO9getArtistO5InputV7HeadersV","text":"Headers"},{"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:14DiscogsService10OperationsO9getArtistO","text":"getArtist"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO9getArtistO6OutputO","text":"Output"}],"role":"symbol","title":"getArtist(path:headers:)","kind":"symbol","abstract":[{"type":"text","text":"Get information about an artist."}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getArtist(path:headers:)","type":"topic","url":"\/documentation\/discogsservice\/client\/getartist(path:headers:)"},"doc://DiscogsService/documentation/DiscogsService/Operations/getArtist":{"fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"getArtist"}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"getArtist"}],"title":"Operations.getArtist","kind":"symbol","abstract":[{"type":"text","text":"Get information about an artist."}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getArtist","type":"topic","url":"\/documentation\/discogsservice\/operations\/getartist"},"doc://DiscogsService/documentation/DiscogsService/Operations":{"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Operations","kind":"identifier"}],"role":"symbol","navigatorTitle":[{"text":"Operations","kind":"identifier"}],"title":"Operations","abstract":[{"text":"API operations, with input and output types, generated from ","type":"text"},{"type":"codeVoice","code":"#\/paths"},{"type":"text","text":" in the OpenAPI document."}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","kind":"symbol","type":"topic","url":"\/documentation\/discogsservice\/operations"},"doc://DiscogsService/documentation/DiscogsService/Operations/getArtist/Input":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Input"}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Input"}],"title":"Operations.getArtist.Input","kind":"symbol","abstract":[],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getArtist\/Input","type":"topic","url":"\/documentation\/discogsservice\/operations\/getartist\/input"}}} |