9a30b69561
This PR contains the work done to implement the *Authentication* endpoints of the Discogs API: * GET `/oauth/request_token` * POST `/oauth/access_token` * GET `/oauth/identity` Reviewed-on: #9 Co-authored-by: Javier Cicchelli <javier@rock-n-code.com> Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
1 line
6.3 KiB
JSON
1 line
6.3 KiB
JSON
{"schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"type":"text","text":"Initializes this middleware."}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/UserAgentMiddleware\/init(product:)"},"sections":[],"kind":"symbol","metadata":{"role":"symbol","externalID":"s:14DiscogsService19UserAgentMiddlewareV7productAcA7ProductV_tKcfc","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"text":"product","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Product","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService7ProductV"},{"text":") ","kind":"text"},{"text":"throws","kind":"keyword"}],"symbolKind":"init","modules":[{"name":"DiscogsService"}],"roleHeading":"Initializer","title":"init(product:)"},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"init","kind":"keyword"},{"text":"(","kind":"text"},{"text":"product","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:14DiscogsService7ProductV","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Product","text":"Product","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"throws","kind":"keyword"}]}]},{"kind":"parameters","parameters":[{"content":[{"type":"paragraph","inlineContent":[{"text":"A product from which the user agent will be generated from.","type":"text"}]}],"name":"product"}]},{"kind":"content","content":[{"text":"Discussion","type":"heading","level":2,"anchor":"discussion"},{"name":"Throws","type":"aside","style":"note","content":[{"type":"paragraph","inlineContent":[{"text":"An error of type ","type":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/InputValidationError","isActive":true,"type":"reference"},{"text":" in case an input failed any validation.","type":"text"}]}]}]}],"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/UserAgentMiddleware"]]},"variants":[{"paths":["\/documentation\/discogsservice\/useragentmiddleware\/init(product:)"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://DiscogsService/documentation/DiscogsService/Product":{"url":"\/documentation\/discogsservice\/product","role":"symbol","abstract":[{"type":"text","text":"A type that represents a product that uses the "},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client","type":"reference","isActive":true},{"type":"text","text":" client."}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Product","fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"text":"Product","kind":"identifier"}],"kind":"symbol","type":"topic","title":"Product","navigatorTitle":[{"text":"Product","kind":"identifier"}]},"doc://DiscogsService/documentation/DiscogsService":{"title":"DiscogsService","abstract":[],"role":"collection","type":"topic","kind":"symbol","url":"\/documentation\/discogsservice","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService"},"doc://DiscogsService/documentation/DiscogsService/InputValidationError":{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/InputValidationError","title":"InputValidationError","url":"\/documentation\/discogsservice\/inputvalidationerror","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"InputValidationError"}],"abstract":[{"type":"text","text":"A representation of all the possible validation error that could be thrown while validating an input."}],"role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"InputValidationError"}]},"doc://DiscogsService/documentation/DiscogsService/UserAgentMiddleware":{"url":"\/documentation\/discogsservice\/useragentmiddleware","role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/UserAgentMiddleware","abstract":[{"type":"text","text":"A middleware that attaches the user agent header into the requests to the service."}],"fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"kind":"identifier","text":"UserAgentMiddleware"}],"kind":"symbol","type":"topic","title":"UserAgentMiddleware","navigatorTitle":[{"kind":"identifier","text":"UserAgentMiddleware"}]},"doc://DiscogsService/documentation/DiscogsService/UserAgentMiddleware/init(product:)":{"abstract":[{"type":"text","text":"Initializes this middleware."}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/UserAgentMiddleware\/init(product:)","url":"\/documentation\/discogsservice\/useragentmiddleware\/init(product:)","title":"init(product:)","role":"symbol","type":"topic","kind":"symbol","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"text":"product","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Product","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService7ProductV"},{"text":") ","kind":"text"},{"text":"throws","kind":"keyword"}]},"doc://DiscogsService/documentation/DiscogsService/Client":{"url":"\/documentation\/discogsservice\/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 "},{"inlineContent":[{"type":"text","text":"Artists"}],"type":"emphasis"},{"type":"text","text":", "},{"inlineContent":[{"type":"text","text":"Releases"}],"type":"emphasis"},{"type":"text","text":", and "},{"inlineContent":[{"type":"text","text":"Labels"}],"type":"emphasis"},{"type":"text","text":". Your application can also manage "},{"inlineContent":[{"type":"text","text":"User Collections"}],"type":"emphasis"},{"type":"text","text":" and "},{"inlineContent":[{"type":"text","text":"Wantlists"}],"type":"emphasis"},{"type":"text","text":", create "},{"inlineContent":[{"type":"text","text":"Marketplace"}],"type":"emphasis"},{"type":"text","text":" listings, and more."}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Client","kind":"identifier"}],"kind":"symbol","type":"topic","title":"Client","navigatorTitle":[{"text":"Client","kind":"identifier"}]}}} |