bfc9e67d38
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>
1 line
9.7 KiB
JSON
1 line
9.7 KiB
JSON
{"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/searchDatabase(_:)"},"sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/discogsservice\/client\/searchdatabase(_:)"]}],"abstract":[{"type":"text","text":"Search any information from the database."}],"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"searchDatabase","kind":"identifier"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"input","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"Operations","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"text":"searchDatabase","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO"},{"text":".","kind":"text"},{"text":"Input","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Input","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO5InputV"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"text":"Operations","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"text":"searchDatabase","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO"},{"text":".","kind":"text"},{"text":"Output","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO6OutputO"}],"platforms":["macOS"],"languages":["swift"]}]},{"content":[{"level":2,"anchor":"discussion","type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"text":"Issue a search query to the Discogs database.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"This endpoint supports pagination and also, it requires authentication.","type":"text"}]},{"content":[{"type":"paragraph","inlineContent":[{"text":"HTTP ","type":"text"},{"code":"GET \/database\/search","type":"codeVoice"},{"text":".","type":"text"}]}],"name":"Remark","type":"aside","style":"note"},{"content":[{"type":"paragraph","inlineContent":[{"text":"Generated from ","type":"text"},{"code":"#\/paths\/\/database\/search\/get(searchDatabase)","type":"codeVoice"},{"text":".","type":"text"}]}],"name":"Remark","type":"aside","style":"note"}],"kind":"content"}],"metadata":{"role":"symbol","symbolKind":"method","roleHeading":"Instance Method","modules":[{"name":"DiscogsService"}],"externalID":"s:14DiscogsService6ClientV14searchDatabaseyAA10OperationsOADO6OutputOAG5InputVYaKF","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"searchDatabase","kind":"identifier"},{"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":"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"}],"title":"searchDatabase(_:)"},"kind":"symbol","references":{"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"},"doc://DiscogsService/documentation/DiscogsService/Operations/searchDatabase/Output":{"title":"Operations.searchDatabase.Output","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output","navigatorTitle":[{"text":"Output","kind":"identifier"}],"abstract":[],"type":"topic","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Output","kind":"identifier"}],"role":"symbol","url":"\/documentation\/discogsservice\/operations\/searchdatabase\/output","kind":"symbol"},"doc://DiscogsService/documentation/DiscogsService/Operations/searchDatabase/Input":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Input"}],"role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Input"}],"title":"Operations.searchDatabase.Input","kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Input","abstract":[],"type":"topic","url":"\/documentation\/discogsservice\/operations\/searchdatabase\/input"},"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/Client":{"role":"symbol","type":"topic","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":[{"text":"Labels","type":"text"}]},{"type":"text","text":". Your application can also manage "},{"type":"emphasis","inlineContent":[{"text":"User Collections","type":"text"}]},{"type":"text","text":" and "},{"type":"emphasis","inlineContent":[{"text":"Wantlists","type":"text"}]},{"type":"text","text":", create "},{"type":"emphasis","inlineContent":[{"text":"Marketplace","type":"text"}]},{"type":"text","text":" listings, and more."}],"kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client","url":"\/documentation\/discogsservice\/client","navigatorTitle":[{"text":"Client","kind":"identifier"}],"title":"Client","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Client","kind":"identifier"}]},"doc://DiscogsService/documentation/DiscogsService/Operations/searchDatabase":{"abstract":[{"type":"text","text":"Search any information from the database."}],"kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase","role":"symbol","title":"Operations.searchDatabase","navigatorTitle":[{"text":"searchDatabase","kind":"identifier"}],"type":"topic","url":"\/documentation\/discogsservice\/operations\/searchdatabase","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"searchDatabase","kind":"identifier"}]},"doc://DiscogsService/documentation/DiscogsService/Client/searchDatabase(_:)":{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/searchDatabase(_:)","role":"symbol","title":"searchDatabase(_:)","url":"\/documentation\/discogsservice\/client\/searchdatabase(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"searchDatabase"},{"kind":"text","text":"("},{"preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier","text":"Operations"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO","kind":"typeIdentifier","text":"searchDatabase"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO5InputV","kind":"typeIdentifier","text":"Input"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier","text":"Operations"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO","kind":"typeIdentifier","text":"searchDatabase"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO6OutputO","kind":"typeIdentifier","text":"Output"}],"abstract":[{"type":"text","text":"Search any information from the database."}],"kind":"symbol","type":"topic"}}} |