Implemented the Authentication endpoints (#9)

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>
This commit was merged in pull request #9.
This commit is contained in:
2025-10-13 17:55:48 +00:00
committed by Javier Cicchelli
parent de5b4ff5d0
commit 9a30b69561
2517 changed files with 2674 additions and 2160 deletions
@@ -1 +1 @@
{"identifier":{"url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/AuthTransport\/!=(_:_:)","interfaceLanguage":"swift"},"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/AuthTransport"]]},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"internalParam","text":"lhs"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"kind":"internalParam","text":"rhs"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"languages":["swift"]}],"kind":"declarations"},{"kind":"parameters","parameters":[{"name":"lhs","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"A value to compare."}]}]},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Another value to compare."}]}],"name":"rhs"}]},{"content":[{"type":"heading","level":2,"anchor":"discussion","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Inequality is the inverse of equality. For any values "},{"type":"codeVoice","code":"a"},{"type":"text","text":" and "},{"type":"codeVoice","code":"b"},{"type":"text","text":", "},{"type":"codeVoice","code":"a != b"},{"type":"text","text":" "},{"type":"text","text":"implies that "},{"type":"codeVoice","code":"a == b"},{"type":"text","text":" is "},{"type":"codeVoice","code":"false"},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This is the default implementation of the not-equal-to operator ("},{"type":"codeVoice","code":"!="},{"type":"text","text":")"},{"type":"text","text":" "},{"type":"text","text":"for any type that conforms to "},{"type":"codeVoice","code":"Equatable"},{"type":"text","text":"."}]}],"kind":"content"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/discogsservice\/authtransport\/!=(_:_:)"]}],"abstract":[{"type":"text","text":"Returns a Boolean value indicating whether two values are not equal."}],"metadata":{"fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"!=","kind":"identifier"},{"text":" ","kind":"text"},{"text":"(","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"title":"!=(_:_:)","role":"symbol","externalID":"s:SQsE2neoiySbx_xtFZ::SYNTHESIZED::s:14DiscogsService13AuthTransportO","roleHeading":"Operator","modules":[{"relatedModules":["Swift"],"name":"DiscogsService"}],"extendedModule":"Swift","symbolKind":"op"},"kind":"symbol","schemaVersion":{"major":0,"patch":0,"minor":3},"sections":[],"references":{"doc://DiscogsService/documentation/DiscogsService/AuthTransport/!=(_:_:)":{"type":"topic","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:Sb","text":"Bool"}],"title":"!=(_:_:)","url":"\/documentation\/discogsservice\/authtransport\/!=(_:_:)","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/AuthTransport\/!=(_:_:)","abstract":[{"text":"Returns a Boolean value indicating whether two values are not equal.","type":"text"}]},"doc://DiscogsService/documentation/DiscogsService/AuthTransport":{"type":"topic","role":"symbol","kind":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"AuthTransport"}],"navigatorTitle":[{"kind":"identifier","text":"AuthTransport"}],"title":"AuthTransport","url":"\/documentation\/discogsservice\/authtransport","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/AuthTransport","abstract":[{"text":"A representation of the available transport options to send credentials in authenticated requests.","type":"text"}]},"doc://DiscogsService/documentation/DiscogsService":{"type":"topic","title":"DiscogsService","url":"\/documentation\/discogsservice","role":"collection","abstract":[],"kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService"}}}
{"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"internalParam","text":"lhs"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"kind":"internalParam","text":"rhs"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}]}]},{"kind":"parameters","parameters":[{"name":"lhs","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"A value to compare."}]}]},{"name":"rhs","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Another value to compare."}]}]}]},{"kind":"content","content":[{"text":"Discussion","type":"heading","level":2,"anchor":"discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Inequality is the inverse of equality. For any values "},{"type":"codeVoice","code":"a"},{"type":"text","text":" and "},{"type":"codeVoice","code":"b"},{"type":"text","text":", "},{"type":"codeVoice","code":"a != b"},{"type":"text","text":" "},{"type":"text","text":"implies that "},{"type":"codeVoice","code":"a == b"},{"type":"text","text":" is "},{"type":"codeVoice","code":"false"},{"type":"text","text":"."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This is the default implementation of the not-equal-to operator ("},{"type":"codeVoice","code":"!="},{"type":"text","text":")"},{"type":"text","text":" "},{"type":"text","text":"for any type that conforms to "},{"type":"codeVoice","code":"Equatable"},{"type":"text","text":"."}]}]}],"metadata":{"roleHeading":"Operator","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"!=","kind":"identifier"},{"text":" ","kind":"text"},{"text":"(","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"extendedModule":"Swift","symbolKind":"op","title":"!=(_:_:)","role":"symbol","externalID":"s:SQsE2neoiySbx_xtFZ::SYNTHESIZED::s:14DiscogsService13AuthTransportO","modules":[{"name":"DiscogsService","relatedModules":["Swift"]}]},"variants":[{"paths":["\/documentation\/discogsservice\/authtransport\/!=(_:_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"kind":"symbol","schemaVersion":{"major":0,"minor":3,"patch":0},"abstract":[{"text":"Returns a Boolean value indicating whether two values are not equal.","type":"text"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/AuthTransport\/!=(_:_:)"},"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/AuthTransport"]]},"sections":[],"references":{"doc://DiscogsService/documentation/DiscogsService/AuthTransport":{"url":"\/documentation\/discogsservice\/authtransport","role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/AuthTransport","abstract":[{"type":"text","text":"A representation of the available transport options to send credentials in authenticated requests."}],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"AuthTransport","kind":"identifier"}],"kind":"symbol","type":"topic","title":"AuthTransport","navigatorTitle":[{"text":"AuthTransport","kind":"identifier"}]},"doc://DiscogsService/documentation/DiscogsService/AuthTransport/!=(_:_:)":{"url":"\/documentation\/discogsservice\/authtransport\/!=(_:_:)","role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/AuthTransport\/!=(_:_:)","abstract":[{"text":"Returns a Boolean value indicating whether two values are not equal.","type":"text"}],"fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"kind":"symbol","title":"!=(_:_:)","type":"topic"},"doc://DiscogsService/documentation/DiscogsService":{"title":"DiscogsService","abstract":[],"role":"collection","type":"topic","kind":"symbol","url":"\/documentation\/discogsservice","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService"}}}