Files
discogs-service/docs/data/documentation/discogsservice/apiprotocol/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
13 KiB
JSON

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