791ebf4f78
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>
1 line
10 KiB
JSON
1 line
10 KiB
JSON
{"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"symbol","metadata":{"modules":[{"name":"DiscogsService"}],"title":"getReleaseRatingByUser(_:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"getReleaseRatingByUser","kind":"identifier"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO22getReleaseRatingByUserO","text":"getReleaseRatingByUser","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO22getReleaseRatingByUserO5InputV","text":"Input","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:14DiscogsService10OperationsO22getReleaseRatingByUserO","text":"getReleaseRatingByUser","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO22getReleaseRatingByUserO6OutputO","text":"Output","kind":"typeIdentifier"}],"roleHeading":"Instance Method","role":"symbol","externalID":"s:14DiscogsService6ClientV22getReleaseRatingByUseryAA10OperationsOADO6OutputOAG5InputVYaKF","symbolKind":"method"},"abstract":[{"text":"Get information about a rating of release by a user.","type":"text"}],"sections":[],"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"getReleaseRatingByUser","kind":"identifier"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"input","kind":"internalParam"},{"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\/getReleaseRatingByUser","preciseIdentifier":"s:14DiscogsService10OperationsO22getReleaseRatingByUserO","text":"getReleaseRatingByUser","kind":"typeIdentifier"},{"text":".","kind":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRatingByUser\/Input","preciseIdentifier":"s:14DiscogsService10OperationsO22getReleaseRatingByUserO5InputV","text":"Input","kind":"typeIdentifier"},{"text":") ","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\/getReleaseRatingByUser","preciseIdentifier":"s:14DiscogsService10OperationsO22getReleaseRatingByUserO","text":"getReleaseRatingByUser","kind":"typeIdentifier"},{"text":".","kind":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRatingByUser\/Output","preciseIdentifier":"s:14DiscogsService10OperationsO22getReleaseRatingByUserO6OutputO","text":"Output","kind":"typeIdentifier"}],"languages":["swift"]}]},{"kind":"content","content":[{"text":"Discussion","anchor":"discussion","level":2,"type":"heading"},{"inlineContent":[{"type":"text","text":"Retrieves the rating for a given release by a specific user."}],"type":"paragraph"},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"HTTP "},{"type":"codeVoice","code":"GET \/releases\/{release_id}\/rating\/{username}"},{"type":"text","text":"."}]}],"style":"note","name":"Remark","type":"aside"},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Generated from "},{"type":"codeVoice","code":"#\/paths\/\/releases\/{release_id}\/rating\/{username}\/get(getReleaseRatingByUser)"},{"type":"text","text":"."}]}],"style":"note","name":"Remark","type":"aside"}]}],"identifier":{"url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getReleaseRatingByUser(_:)","interfaceLanguage":"swift"},"variants":[{"paths":["\/documentation\/discogsservice\/client\/getreleaseratingbyuser(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://DiscogsService/documentation/DiscogsService/Client":{"url":"\/documentation\/discogsservice\/client","type":"topic","title":"Client","kind":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Client","kind":"identifier"}],"navigatorTitle":[{"text":"Client","kind":"identifier"}],"abstract":[{"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":"text"},{"inlineContent":[{"type":"text","text":"Artists"}],"type":"emphasis"},{"text":", ","type":"text"},{"inlineContent":[{"type":"text","text":"Releases"}],"type":"emphasis"},{"text":", and ","type":"text"},{"inlineContent":[{"type":"text","text":"Labels"}],"type":"emphasis"},{"text":". Your application can also manage ","type":"text"},{"inlineContent":[{"type":"text","text":"User Collections"}],"type":"emphasis"},{"text":" and ","type":"text"},{"inlineContent":[{"type":"text","text":"Wantlists"}],"type":"emphasis"},{"text":", create ","type":"text"},{"inlineContent":[{"type":"text","text":"Marketplace"}],"type":"emphasis"},{"text":" listings, and more.","type":"text"}],"role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client"},"doc://DiscogsService/documentation/DiscogsService/Client/getReleaseRatingByUser(_:)":{"url":"\/documentation\/discogsservice\/client\/getreleaseratingbyuser(_:)","type":"topic","title":"getReleaseRatingByUser(_:)","kind":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"getReleaseRatingByUser"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO22getReleaseRatingByUserO","text":"getReleaseRatingByUser"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO22getReleaseRatingByUserO5InputV","text":"Input"},{"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:14DiscogsService10OperationsO22getReleaseRatingByUserO","text":"getReleaseRatingByUser"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO22getReleaseRatingByUserO6OutputO","text":"Output"}],"abstract":[{"text":"Get information about a rating of release by a user.","type":"text"}],"role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getReleaseRatingByUser(_:)"},"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/getReleaseRatingByUser":{"title":"Operations.getReleaseRatingByUser","navigatorTitle":[{"text":"getReleaseRatingByUser","kind":"identifier"}],"role":"symbol","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"getReleaseRatingByUser","kind":"identifier"}],"abstract":[{"text":"Get information about a rating of release by a user.","type":"text"}],"kind":"symbol","type":"topic","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRatingByUser","url":"\/documentation\/discogsservice\/operations\/getreleaseratingbyuser"},"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/getReleaseRatingByUser/Input":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Input","kind":"identifier"}],"abstract":[],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRatingByUser\/Input","role":"symbol","url":"\/documentation\/discogsservice\/operations\/getreleaseratingbyuser\/input","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Input","kind":"identifier"}],"title":"Operations.getReleaseRatingByUser.Input"},"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseRatingByUser/Output":{"kind":"symbol","type":"topic","navigatorTitle":[{"text":"Output","kind":"identifier"}],"abstract":[],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRatingByUser\/Output","role":"symbol","url":"\/documentation\/discogsservice\/operations\/getreleaseratingbyuser\/output","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Output","kind":"identifier"}],"title":"Operations.getReleaseRatingByUser.Output"}}} |