Files
discogs-service/docs/data/documentation/discogsservice/client/getreleaserating(path:headers:).json
T
javier bfc9e67d38 Implemented the Authentication middleware (#3)
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>
2025-10-11 07:39:52 +00:00

1 line
14 KiB
JSON

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