Files
discogs-service/docs/data/documentation/discogsservice/apiprotocol/getreleaserating(_:).json
T
javier 791ebf4f78 Implemented the User Agent middleware (#6)
This PR contains the work done to implement the `UserAgentMiddleware` middleware that includes user agent information into a header of the requests sent by the `Client` type, as defined in the [Discogs documentation](https://www.discogs.com/developers/#page:home,header:home-general-information). For this purpose, the `CamelCaseValidationRule`, `SemanticVersionValidationRule` and `URLValidationRule` types were implemented and integrated into the existing `ValidateInputUseCase` type.

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

1 line
9.1 KiB
JSON

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