Files
discogs-service/docs/data/documentation/discogsservice/client/searchdatabase(query:headers:).json
T
javier 428eedd89d Implemented the Services and Database GET endpoints (#2)
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>
2025-10-09 23:51:39 +00:00

1 line
14 KiB
JSON

{"sections":[],"abstract":[{"type":"text","text":"Search any information from the database."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"searchDatabase"},{"kind":"text","text":"("},{"kind":"externalParam","text":"query"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Operations","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"searchDatabase","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Input","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Input","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO5InputV"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Query","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Input\/Query-swift.struct","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO5InputV5QueryV"},{"kind":"text","text":" = .init(), "},{"kind":"externalParam","text":"headers"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Operations","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"searchDatabase","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Input","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Input","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO5InputV"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Headers","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Input\/Headers-swift.struct","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO5InputV7HeadersV"},{"kind":"text","text":" = .init()) "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","text":"Operations","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"searchDatabase","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Output","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO6OutputO"}],"platforms":["macOS"]}]},{"kind":"content","content":[{"level":2,"anchor":"discussion","type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Issue a search query to the Discogs database."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This endpoint supports pagination and also, it requires authentication."}]},{"style":"note","type":"aside","name":"Remark","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"HTTP "},{"type":"codeVoice","code":"GET \/database\/search"},{"type":"text","text":"."}]}]},{"style":"note","type":"aside","name":"Remark","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Generated from "},{"type":"codeVoice","code":"#\/paths\/\/database\/search\/get(searchDatabase)"},{"type":"text","text":"."}]}]}]}],"kind":"symbol","schemaVersion":{"major":0,"minor":3,"patch":0},"metadata":{"role":"symbol","extendedModule":"DiscogsService","title":"searchDatabase(query:headers:)","roleHeading":"Instance Method","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"searchDatabase","kind":"identifier"},{"text":"(","kind":"text"},{"text":"query","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"text":"searchDatabase","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO"},{"text":".","kind":"text"},{"text":"Input","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO5InputV"},{"text":".","kind":"text"},{"text":"Query","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO5InputV5QueryV"},{"text":", ","kind":"text"},{"text":"headers","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"text":"searchDatabase","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO"},{"text":".","kind":"text"},{"text":"Input","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO5InputV"},{"text":".","kind":"text"},{"text":"Headers","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO5InputV7HeadersV"},{"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":"searchDatabase","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO"},{"text":".","kind":"text"},{"text":"Output","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO6OutputO"}],"externalID":"s:14DiscogsService11APIProtocolPAAE14searchDatabase5query7headersAA10OperationsOADO6OutputOAI5InputV5QueryV_AM7HeadersVtYaKF::SYNTHESIZED::s:14DiscogsService6ClientV","symbolKind":"method","modules":[{"name":"DiscogsService"}]},"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client"]]},"variants":[{"paths":["\/documentation\/discogsservice\/client\/searchdatabase(query:headers:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/searchDatabase(query:headers:)","interfaceLanguage":"swift"},"references":{"doc://DiscogsService/documentation/DiscogsService/Operations/searchDatabase/Output":{"navigatorTitle":[{"kind":"identifier","text":"Output"}],"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Output"}],"url":"\/documentation\/discogsservice\/operations\/searchdatabase\/output","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output","abstract":[],"title":"Operations.searchDatabase.Output"},"doc://DiscogsService/documentation/DiscogsService/Operations/searchDatabase/Input/Headers-swift.struct":{"role":"symbol","type":"topic","abstract":[],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Input\/Headers-swift.struct","url":"\/documentation\/discogsservice\/operations\/searchdatabase\/input\/headers-swift.struct","title":"Operations.searchDatabase.Input.Headers","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Headers"}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Headers"}]},"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/searchDatabase/Input":{"navigatorTitle":[{"kind":"identifier","text":"Input"}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Input"}],"url":"\/documentation\/discogsservice\/operations\/searchdatabase\/input","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Input","title":"Operations.searchDatabase.Input","kind":"symbol","role":"symbol","abstract":[],"type":"topic"},"doc://DiscogsService/documentation/DiscogsService/Operations/searchDatabase":{"url":"\/documentation\/discogsservice\/operations\/searchdatabase","abstract":[{"type":"text","text":"Search any information from the database."}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase","kind":"symbol","role":"symbol","title":"Operations.searchDatabase","type":"topic","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"searchDatabase","kind":"identifier"}],"navigatorTitle":[{"text":"searchDatabase","kind":"identifier"}]},"doc://DiscogsService/documentation/DiscogsService/Client/searchDatabase(query:headers:)":{"title":"searchDatabase(query:headers:)","kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/searchDatabase(query:headers:)","url":"\/documentation\/discogsservice\/client\/searchdatabase(query:headers:)","abstract":[{"type":"text","text":"Search any information from the database."}],"type":"topic","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"searchDatabase","kind":"identifier"},{"text":"(","kind":"text"},{"kind":"externalParam","text":"query"},{"kind":"text","text":": "},{"preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier","text":"Operations"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO","kind":"typeIdentifier","text":"searchDatabase"},{"text":".","kind":"text"},{"text":"Input","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO5InputV"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO5InputV5QueryV","kind":"typeIdentifier","text":"Query"},{"text":", ","kind":"text"},{"text":"headers","kind":"externalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO","text":"searchDatabase","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO5InputV","text":"Input","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO5InputV7HeadersV","text":"Headers","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations","kind":"typeIdentifier"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO","kind":"typeIdentifier","text":"searchDatabase"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO6OutputO","kind":"typeIdentifier","text":"Output"}],"role":"symbol"},"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/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/searchDatabase/Input/Query-swift.struct":{"navigatorTitle":[{"kind":"identifier","text":"Query"}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Query"}],"url":"\/documentation\/discogsservice\/operations\/searchdatabase\/input\/query-swift.struct","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Input\/Query-swift.struct","title":"Operations.searchDatabase.Input.Query","kind":"symbol","role":"symbol","abstract":[],"type":"topic"}}}