428eedd89d
This PR contains the work done to include the define the information sections of the `OpenAPI` specification document and all the `GET` endpoints of the _Service_ and _Database_ categories.
The following endpoints have been defined in the document, and also tested manually with `Swift`:
* GET `/`
* GET `/artists/{artist_id}`
* GET `/artists/{artist_id}/releases`
* GET `/labels/{label_id}`
* GET `/labels/{label_id}/releases`
* GET `/masters/{master_id}`
* GET `/masters/{master_id}/versions`
* GET `/releases/{release_id}`
* GET `/releases/{release_id}/rating`
* GET `/releases/{release_id}/rating/{username}`
* GET `/releases/{release_id}/stats`
* GET `/database/search`
In addition, a first version of the _Github Pages_ documentation has been generated from the `DocC` documentation catalog, and the generated Swift code from the `openapi.yaml` file.
Reviewed-on: #2
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
{"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getReleaseRating(path:headers:)"},"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client"]]},"metadata":{"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","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"getReleaseRating","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO16getReleaseRatingO"},{"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"},{"text":"Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"text":"getReleaseRating","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO16getReleaseRatingO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO16getReleaseRatingO6OutputO","text":"Output"}],"roleHeading":"Instance Method","role":"symbol","title":"getReleaseRating(path:headers:)","modules":[{"name":"DiscogsService"}],"extendedModule":"DiscogsService","externalID":"s:14DiscogsService11APIProtocolPAAE16getReleaseRating4path7headersAA10OperationsOADO6OutputOAI5InputV4PathV_AM7HeadersVtYaKF::SYNTHESIZED::s:14DiscogsService6ClientV","symbolKind":"method"},"kind":"symbol","abstract":[{"type":"text","text":"Get information about a rating of release."}],"schemaVersion":{"patch":0,"major":0,"minor":3},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","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"},{"kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating","preciseIdentifier":"s:14DiscogsService10OperationsO16getReleaseRatingO","text":"getReleaseRating"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Input","preciseIdentifier":"s:14DiscogsService10OperationsO16getReleaseRatingO5InputV","text":"Input"},{"kind":"text","text":"."},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Input\/Path-swift.struct","kind":"typeIdentifier","text":"Path","preciseIdentifier":"s:14DiscogsService10OperationsO16getReleaseRatingO5InputV4PathV"},{"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"},{"text":"Output","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Output","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO16getReleaseRatingO6OutputO"}],"languages":["swift"]}]},{"kind":"content","content":[{"anchor":"discussion","type":"heading","text":"Discussion","level":2},{"inlineContent":[{"text":"Retrieves the average rating and the total number of user ratings for a given release.","type":"text"}],"type":"paragraph"},{"name":"Remark","content":[{"type":"paragraph","inlineContent":[{"text":"HTTP ","type":"text"},{"code":"GET \/releases\/{release_id}\/rating","type":"codeVoice"},{"text":".","type":"text"}]}],"style":"note","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"}]}],"variants":[{"paths":["\/documentation\/discogsservice\/client\/getreleaserating(path:headers:)"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://DiscogsService/documentation/DiscogsService/Client":{"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Client"}],"type":"topic","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client","navigatorTitle":[{"kind":"identifier","text":"Client"}],"title":"Client","role":"symbol","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":[{"type":"text","text":"Labels"}]},{"type":"text","text":". Your application can also manage "},{"type":"emphasis","inlineContent":[{"type":"text","text":"User Collections"}]},{"type":"text","text":" and "},{"type":"emphasis","inlineContent":[{"text":"Wantlists","type":"text"}]},{"text":", create ","type":"text"},{"type":"emphasis","inlineContent":[{"type":"text","text":"Marketplace"}]},{"text":" listings, and more.","type":"text"}],"kind":"symbol","url":"\/documentation\/discogsservice\/client"},"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseRating":{"url":"\/documentation\/discogsservice\/operations\/getreleaserating","abstract":[{"text":"Get information about a rating of release.","type":"text"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating","kind":"symbol","role":"symbol","title":"Operations.getReleaseRating","type":"topic","fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"text":"getReleaseRating","kind":"identifier"}],"navigatorTitle":[{"text":"getReleaseRating","kind":"identifier"}]},"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseRating/Input/Headers-swift.struct":{"role":"symbol","type":"topic","abstract":[],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Input\/Headers-swift.struct","url":"\/documentation\/discogsservice\/operations\/getreleaserating\/input\/headers-swift.struct","title":"Operations.getReleaseRating.Input.Headers","kind":"symbol","navigatorTitle":[{"text":"Headers","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Headers","kind":"identifier"}]},"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseRating/Input":{"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Input","kind":"identifier"}],"type":"topic","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Input","navigatorTitle":[{"text":"Input","kind":"identifier"}],"title":"Operations.getReleaseRating.Input","role":"symbol","abstract":[],"kind":"symbol","url":"\/documentation\/discogsservice\/operations\/getreleaserating\/input"},"doc://DiscogsService/documentation/DiscogsService":{"url":"\/documentation\/discogsservice","abstract":[],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService","kind":"symbol","role":"collection","type":"topic","title":"DiscogsService"},"doc://DiscogsService/documentation/DiscogsService/Operations":{"navigatorTitle":[{"kind":"identifier","text":"Operations"}],"fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"Operations"}],"url":"\/documentation\/discogsservice\/operations","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","abstract":[{"text":"API operations, with input and output types, generated from ","type":"text"},{"code":"#\/paths","type":"codeVoice"},{"text":" in the OpenAPI document.","type":"text"}],"title":"Operations"},"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseRating/Output":{"navigatorTitle":[{"text":"Output","kind":"identifier"}],"title":"Operations.getReleaseRating.Output","abstract":[],"role":"symbol","type":"topic","url":"\/documentation\/discogsservice\/operations\/getreleaserating\/output","kind":"symbol","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Output","kind":"identifier"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Output"},"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseRating/Input/Path-swift.struct":{"role":"symbol","type":"topic","abstract":[],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Input\/Path-swift.struct","url":"\/documentation\/discogsservice\/operations\/getreleaserating\/input\/path-swift.struct","title":"Operations.getReleaseRating.Input.Path","kind":"symbol","navigatorTitle":[{"text":"Path","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Path"}]},"doc://DiscogsService/documentation/DiscogsService/Client/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"},{"kind":"typeIdentifier","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"getReleaseRating","preciseIdentifier":"s:14DiscogsService10OperationsO16getReleaseRatingO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO16getReleaseRatingO5InputV"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO16getReleaseRatingO5InputV4PathV","text":"Path","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"headers","kind":"externalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"getReleaseRating","preciseIdentifier":"s:14DiscogsService10OperationsO16getReleaseRatingO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO16getReleaseRatingO5InputV"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Headers","preciseIdentifier":"s:14DiscogsService10OperationsO16getReleaseRatingO5InputV7HeadersV"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"getReleaseRating","preciseIdentifier":"s:14DiscogsService10OperationsO16getReleaseRatingO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO16getReleaseRatingO6OutputO"}],"type":"topic","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getReleaseRating(path:headers:)","title":"getReleaseRating(path:headers:)","role":"symbol","abstract":[{"type":"text","text":"Get information about a rating of release."}],"kind":"symbol","url":"\/documentation\/discogsservice\/client\/getreleaserating(path:headers:)"}}} |