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
{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/discogsservice\/client\/getreleasestats(path:headers:)"]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getReleaseStats(path:headers:)"},"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client"]]},"sections":[],"abstract":[{"type":"text","text":"Get information about statistics of release."}],"kind":"symbol","metadata":{"symbolKind":"method","externalID":"s:14DiscogsService11APIProtocolPAAE15getReleaseStats4path7headersAA10OperationsOADO6OutputOAI5InputV4PathV_AM7HeadersVtYaKF::SYNTHESIZED::s:14DiscogsService6ClientV","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"getReleaseStats"},{"kind":"text","text":"("},{"kind":"externalParam","text":"path"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO","text":"getReleaseStats"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO5InputV","text":"Input"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO5InputV4PathV","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:14DiscogsService10OperationsO15getReleaseStatsO","text":"getReleaseStats"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO5InputV","text":"Input"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO5InputV7HeadersV","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:14DiscogsService10OperationsO15getReleaseStatsO","text":"getReleaseStats"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO6OutputO","text":"Output"}],"role":"symbol","extendedModule":"DiscogsService","modules":[{"name":"DiscogsService"}],"roleHeading":"Instance Method","title":"getReleaseStats(path:headers:)"},"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"getReleaseStats","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":"getReleaseStats","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO"},{"text":".","kind":"text"},{"text":"Input","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Input","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO5InputV"},{"text":".","kind":"text"},{"text":"Path","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Input\/Path-swift.struct","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO5InputV4PathV"},{"text":", ","kind":"text"},{"text":"headers","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Operations","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"text":"getReleaseStats","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO"},{"text":".","kind":"text"},{"text":"Input","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Input","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO5InputV"},{"text":".","kind":"text"},{"text":"Headers","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Input\/Headers-swift.struct","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO5InputV7HeadersV"},{"text":" = .init()) ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"text":"Operations","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"text":"getReleaseStats","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO"},{"text":".","kind":"text"},{"text":"Output","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Output","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO6OutputO"}],"platforms":["macOS"]}],"kind":"declarations"},{"content":[{"level":2,"anchor":"discussion","type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"text":"Retrieves the total number of “haves” (in the community’s collections) and “wants” (in the community’s wantlists) for a given release.","type":"text"}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"HTTP "},{"code":"GET \/releases\/{release_id}\/stats","type":"codeVoice"},{"type":"text","text":"."}]}],"type":"aside","style":"note","name":"Remark"},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Generated from "},{"code":"#\/paths\/\/releases\/{release_id}\/stats\/get(getReleaseStats)","type":"codeVoice"},{"type":"text","text":"."}]}],"type":"aside","style":"note","name":"Remark"}],"kind":"content"}],"references":{"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/Operations/getReleaseStats/Output":{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Output","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Output"}],"type":"topic","url":"\/documentation\/discogsservice\/operations\/getreleasestats\/output","abstract":[],"fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}],"title":"Operations.getReleaseStats.Output","kind":"symbol"},"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/Client/getReleaseStats(path:headers:)":{"role":"symbol","type":"topic","abstract":[{"type":"text","text":"Get information about statistics of release."}],"kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getReleaseStats(path:headers:)","url":"\/documentation\/discogsservice\/client\/getreleasestats(path:headers:)","title":"getReleaseStats(path:headers:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"getReleaseStats","kind":"identifier"},{"text":"(","kind":"text"},{"text":"path","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"text":"getReleaseStats","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO"},{"text":".","kind":"text"},{"text":"Input","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO5InputV"},{"text":".","kind":"text"},{"text":"Path","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO5InputV4PathV"},{"text":", ","kind":"text"},{"text":"headers","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"text":"getReleaseStats","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO"},{"text":".","kind":"text"},{"text":"Input","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO5InputV"},{"text":".","kind":"text"},{"text":"Headers","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO5InputV7HeadersV"},{"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":"getReleaseStats","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO"},{"text":".","kind":"text"},{"text":"Output","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO6OutputO"}]},"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseStats/Input":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Input"}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Input"}],"url":"\/documentation\/discogsservice\/operations\/getreleasestats\/input","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Input","abstract":[],"title":"Operations.getReleaseStats.Input","kind":"symbol","type":"topic"},"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseStats":{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"getReleaseStats"}],"type":"topic","url":"\/documentation\/discogsservice\/operations\/getreleasestats","abstract":[{"type":"text","text":"Get information about statistics of release."}],"fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"getReleaseStats"}],"title":"Operations.getReleaseStats","kind":"symbol"},"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/getReleaseStats/Input/Headers-swift.struct":{"kind":"symbol","role":"symbol","url":"\/documentation\/discogsservice\/operations\/getreleasestats\/input\/headers-swift.struct","navigatorTitle":[{"kind":"identifier","text":"Headers"}],"title":"Operations.getReleaseStats.Input.Headers","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Headers"}],"abstract":[],"type":"topic","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Input\/Headers-swift.struct"},"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseStats/Input/Path-swift.struct":{"url":"\/documentation\/discogsservice\/operations\/getreleasestats\/input\/path-swift.struct","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Path"}],"kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Input\/Path-swift.struct","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Path"}],"type":"topic","title":"Operations.getReleaseStats.Input.Path","abstract":[]}}} |