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
7.1 KiB
JSON
1 line
7.1 KiB
JSON
{"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"init","kind":"keyword"},{"text":"(","kind":"text"},{"text":"serverURL","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"URL","preciseIdentifier":"s:10Foundation3URLV","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"configuration","kind":"externalParam"},{"kind":"text","text":": "},{"text":"Configuration","preciseIdentifier":"s:14OpenAPIRuntime13ConfigurationV","kind":"typeIdentifier"},{"text":" = .init(), ","kind":"text"},{"text":"transport","kind":"externalParam"},{"text":": any ","kind":"text"},{"text":"ClientTransport","preciseIdentifier":"s:14OpenAPIRuntime15ClientTransportP","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"middlewares","kind":"externalParam"},{"text":": [any ","kind":"text"},{"text":"ClientMiddleware","preciseIdentifier":"s:14OpenAPIRuntime16ClientMiddlewareP","kind":"typeIdentifier"},{"text":"] = [])","kind":"text"}],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"content":[{"type":"paragraph","inlineContent":[{"text":"The server URL that the client connects to. Any server","type":"text"},{"type":"text","text":" "},{"type":"text","text":"URLs defined in the OpenAPI document are available as static methods"},{"type":"text","text":" "},{"text":"on the ","type":"text"},{"isActive":true,"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Servers","type":"reference"},{"type":"text","text":" type."}]}],"name":"serverURL"},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"A set of configuration values for the client."}]}],"name":"configuration"},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"A transport that performs HTTP operations."}]}],"name":"transport"},{"content":[{"type":"paragraph","inlineContent":[{"text":"A list of middlewares to call before the transport.","type":"text"}]}],"name":"middlewares"}]}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/discogsservice\/client\/init(serverurl:configuration:transport:middlewares:)"]}],"schemaVersion":{"patch":0,"major":0,"minor":3},"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client"]]},"kind":"symbol","metadata":{"role":"symbol","externalID":"s:14DiscogsService6ClientV9serverURL13configuration9transport11middlewaresAC10Foundation0E0V_14OpenAPIRuntime13ConfigurationVAK0C9Transport_pSayAK0C10Middleware_pGtcfc","modules":[{"name":"DiscogsService"}],"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"serverURL"},{"kind":"text","text":": "},{"preciseIdentifier":"s:10Foundation3URLV","kind":"typeIdentifier","text":"URL"},{"kind":"text","text":", "},{"kind":"externalParam","text":"configuration"},{"kind":"text","text":": "},{"preciseIdentifier":"s:14OpenAPIRuntime13ConfigurationV","kind":"typeIdentifier","text":"Configuration"},{"kind":"text","text":", "},{"kind":"externalParam","text":"transport"},{"kind":"text","text":": any "},{"preciseIdentifier":"s:14OpenAPIRuntime15ClientTransportP","kind":"typeIdentifier","text":"ClientTransport"},{"kind":"text","text":", "},{"kind":"externalParam","text":"middlewares"},{"kind":"text","text":": [any "},{"preciseIdentifier":"s:14OpenAPIRuntime16ClientMiddlewareP","kind":"typeIdentifier","text":"ClientMiddleware"},{"text":"])","kind":"text"}],"symbolKind":"init","title":"init(serverURL:configuration:transport:middlewares:)","roleHeading":"Initializer"},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/init(serverURL:configuration:transport:middlewares:)"},"sections":[],"abstract":[{"type":"text","text":"Creates a new client."}],"references":{"doc://DiscogsService/documentation/DiscogsService/Client/init(serverURL:configuration:transport:middlewares:)":{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/init(serverURL:configuration:transport:middlewares:)","role":"symbol","type":"topic","url":"\/documentation\/discogsservice\/client\/init(serverurl:configuration:transport:middlewares:)","abstract":[{"type":"text","text":"Creates a new client."}],"fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"serverURL"},{"kind":"text","text":": "},{"preciseIdentifier":"s:10Foundation3URLV","kind":"typeIdentifier","text":"URL"},{"kind":"text","text":", "},{"kind":"externalParam","text":"configuration"},{"kind":"text","text":": "},{"preciseIdentifier":"s:14OpenAPIRuntime13ConfigurationV","kind":"typeIdentifier","text":"Configuration"},{"kind":"text","text":", "},{"kind":"externalParam","text":"transport"},{"kind":"text","text":": any "},{"preciseIdentifier":"s:14OpenAPIRuntime15ClientTransportP","kind":"typeIdentifier","text":"ClientTransport"},{"kind":"text","text":", "},{"kind":"externalParam","text":"middlewares"},{"kind":"text","text":": [any "},{"preciseIdentifier":"s:14OpenAPIRuntime16ClientMiddlewareP","kind":"typeIdentifier","text":"ClientMiddleware"},{"kind":"text","text":"])"}],"kind":"symbol","title":"init(serverURL:configuration:transport:middlewares:)"},"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":{"role":"collection","title":"DiscogsService","kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService","abstract":[],"type":"topic","url":"\/documentation\/discogsservice"},"doc://DiscogsService/documentation/DiscogsService/Servers":{"kind":"symbol","url":"\/documentation\/discogsservice\/servers","type":"topic","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Servers","role":"symbol","abstract":[{"type":"text","text":"Server URLs defined in the OpenAPI document."}],"navigatorTitle":[{"kind":"identifier","text":"Servers"}],"fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"Servers"}],"title":"Servers"}}} |