2a7b9746a7
This PR contains the work done to implement the *User Collection* endpoints of the Discogs API into the `OpenAPI` specification document:
* GET `/users/{username}/collection/folders`
* POST `/users/{username}/collection/folders`
* GET `/users/{username}/collection/folders/{folder_id}`
* POST `/users/{username}/collection/folders/{folder_id}`
* DELETE `/users/{username}/collection/folders/{folder_id}`
* GET `/users/{username}/collection/releases/{release_id}`
* GET `/users/{username}/collection/folders/{folder_id}/releases`
* POST `/users/{username}/collection/folders/{folder_id}/releases/{release_id}`
* POST `/users/{username}/collection/folders/{folder_id}/releases/{release_id}/instances/{instance_id}`
* DELETE `/users/{username}/collection/folders/{folder_id}/releases/{release_id}/instances/{instance_id}`
* GET `/users/{username}/collection/fields`
* POST `/users/{username}/collection/folders/{folder_id}/releases/{release_id}/instances/{instance_id}/fields/{field_id}`
* GET `/users/{username}/collection/value`
Reviewed-on: #12
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
1 line
15 KiB
JSON
1 line
15 KiB
JSON
{"sections":[],"metadata":{"roleHeading":"Instance Method","modules":[{"name":"DiscogsService"}],"externalID":"s:14DiscogsService6ClientV15postAccessTokenyAA10OperationsO04PosteF0O6OutputOAH5InputVYaKF","symbolKind":"method","title":"postAccessToken(_:)","role":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"postAccessToken","kind":"identifier"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","text":"PostAccessToken","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV","text":"Input","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","text":"PostAccessToken","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO","text":"Output","kind":"typeIdentifier"}]},"abstract":[{"text":"Provide required credentials data to obtain an access token.","type":"text"}],"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client"]]},"kind":"symbol","seeAlsoSections":[{"generated":true,"anchor":"Authentication-endpoints","identifiers":["doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getRequestToken(_:)","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getUserIdentity(_:)"],"title":"Authentication endpoints"}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"postAccessToken","kind":"identifier"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"input","kind":"internalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations","kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","text":"PostAccessToken","kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV","text":"Input","kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Input"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations","kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","text":"PostAccessToken","kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO","text":"Output","kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Output"}]}],"kind":"declarations"},{"content":[{"text":"Discussion","anchor":"discussion","type":"heading","level":2},{"type":"paragraph","inlineContent":[{"text":"Provide to the service some required credentials details to obtain an access token at the end of the ","type":"text"},{"type":"emphasis","inlineContent":[{"text":"OAuth","type":"text"}]},{"text":" process.","type":"text"}]},{"type":"paragraph","inlineContent":[{"text":"This endpoint represents the ","type":"text"},{"type":"reference","isActive":true,"identifier":"https:\/\/www.discogs.com\/developers#header-4.-send-a-post-request-to-the-discogs-access-token-url"},{"text":", thus it requires to configure an ","type":"text"},{"type":"emphasis","inlineContent":[{"text":"Authorization","type":"text"}]},{"text":" header to have a value like this:","type":"text"}]},{"type":"codeListing","code":["OAuth oauth_consumer_key=\"your_consumer_key\", oauth_nonce=\"random_string_or_timestamp\", oauth_token=\"oauth_token_received_from_step_2\" oauth_signature=\"your_consumer_secret&\", oauth_signature_method=\"PLAINTEXT\", oauth_timestamp=\"current_timestamp\", oauth_verifier=\"users_verifier\""],"syntax":null},{"type":"paragraph","inlineContent":[{"text":"For further details about this process, please refer to the ","type":"text"},{"type":"reference","isActive":true,"identifier":"https:\/\/www.discogs.com\/developers#page:authentication,header:authentication-oauth-flow"},{"text":" section in the ","type":"text"},{"type":"reference","isActive":true,"identifier":"https:\/\/www.discogs.com\/developers#page:authentication"},{"text":" documentation.","type":"text"}]},{"name":"Remark","content":[{"type":"paragraph","inlineContent":[{"text":"HTTP ","type":"text"},{"type":"codeVoice","code":"POST \/oauth\/access_token"},{"text":".","type":"text"}]}],"style":"note","type":"aside"},{"name":"Remark","content":[{"type":"paragraph","inlineContent":[{"text":"Generated from ","type":"text"},{"type":"codeVoice","code":"#\/paths\/\/oauth\/access_token\/post(postAccessToken)"},{"text":".","type":"text"}]}],"style":"note","type":"aside"}],"kind":"content"}],"variants":[{"paths":["\/documentation\/discogsservice\/client\/postaccesstoken(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"patch":0,"minor":3,"major":0},"identifier":{"url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/postAccessToken(_:)","interfaceLanguage":"swift"},"references":{"doc://DiscogsService/documentation/DiscogsService/Operations/PostAccessToken":{"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"PostAccessToken"}],"title":"Operations.PostAccessToken","abstract":[{"text":"Provide required credentials data to obtain an access token.","type":"text"}],"kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken","role":"symbol","navigatorTitle":[{"text":"PostAccessToken","kind":"identifier"}],"type":"topic","url":"\/documentation\/discogsservice\/operations\/postaccesstoken"},"doc://DiscogsService/documentation/DiscogsService":{"url":"\/documentation\/discogsservice","abstract":[],"kind":"symbol","type":"topic","title":"DiscogsService","role":"collection","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService"},"doc://DiscogsService/documentation/DiscogsService/Client":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Client"}],"title":"Client","abstract":[{"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":"text"},{"inlineContent":[{"text":"Artists","type":"text"}],"type":"emphasis"},{"text":", ","type":"text"},{"inlineContent":[{"text":"Releases","type":"text"}],"type":"emphasis"},{"text":", and ","type":"text"},{"inlineContent":[{"text":"Labels","type":"text"}],"type":"emphasis"},{"text":". Your application can also manage ","type":"text"},{"inlineContent":[{"text":"User Collections","type":"text"}],"type":"emphasis"},{"text":" and ","type":"text"},{"inlineContent":[{"text":"Wantlists","type":"text"}],"type":"emphasis"},{"text":", create ","type":"text"},{"inlineContent":[{"text":"Marketplace","type":"text"}],"type":"emphasis"},{"text":" listings, and more.","type":"text"}],"kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"Client"}],"type":"topic","url":"\/documentation\/discogsservice\/client"},"doc://DiscogsService/documentation/DiscogsService/Operations/PostAccessToken/Output":{"abstract":[],"title":"Operations.PostAccessToken.Output","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Output","kind":"identifier"}],"role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Output","url":"\/documentation\/discogsservice\/operations\/postaccesstoken\/output","navigatorTitle":[{"text":"Output","kind":"identifier"}],"type":"topic","kind":"symbol"},"doc://DiscogsService/documentation/DiscogsService/Operations/PostAccessToken/Input":{"url":"\/documentation\/discogsservice\/operations\/postaccesstoken\/input","navigatorTitle":[{"text":"Input","kind":"identifier"}],"type":"topic","kind":"symbol","abstract":[],"title":"Operations.PostAccessToken.Input","role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Input","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Input","kind":"identifier"}]},"doc://DiscogsService/documentation/DiscogsService/Client/getRequestToken(_:)":{"url":"\/documentation\/discogsservice\/client\/getrequesttoken(_:)","abstract":[{"type":"text","text":"Get details about a OAuth request token."}],"kind":"symbol","type":"topic","title":"getRequestToken(_:)","role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getRequestToken(_:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"getRequestToken","kind":"identifier"},{"text":"(","kind":"text"},{"text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"GetRequestToken","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO5InputV","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"GetRequestToken","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO15GetRequestTokenO6OutputO","kind":"typeIdentifier"}]},"https://www.discogs.com/developers#page:authentication":{"identifier":"https:\/\/www.discogs.com\/developers#page:authentication","titleInlineContent":[{"text":"Discogs API authentication","type":"text"}],"type":"link","title":"Discogs API authentication","url":"https:\/\/www.discogs.com\/developers#page:authentication"},"doc://DiscogsService/documentation/DiscogsService/Client/postAccessToken(_:)":{"url":"\/documentation\/discogsservice\/client\/postaccesstoken(_:)","type":"topic","abstract":[{"type":"text","text":"Provide required credentials data to obtain an access token."}],"kind":"symbol","title":"postAccessToken(_:)","role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/postAccessToken(_:)","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"kind":"identifier","text":"postAccessToken"},{"kind":"text","text":"("},{"preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier","text":"Operations"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","kind":"typeIdentifier","text":"PostAccessToken"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV","kind":"typeIdentifier","text":"Input"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"PostAccessToken","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO","kind":"typeIdentifier"}]},"https://www.discogs.com/developers#page:authentication,header:authentication-oauth-flow":{"identifier":"https:\/\/www.discogs.com\/developers#page:authentication,header:authentication-oauth-flow","titleInlineContent":[{"text":"OAuth flow","type":"text"}],"type":"link","title":"OAuth flow","url":"https:\/\/www.discogs.com\/developers#page:authentication,header:authentication-oauth-flow"},"doc://DiscogsService/documentation/DiscogsService/Client/getUserIdentity(_:)":{"role":"symbol","type":"topic","abstract":[{"text":"Get information about an authenticated user.","type":"text"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/getUserIdentity(_:)","url":"\/documentation\/discogsservice\/client\/getuseridentity(_:)","title":"getUserIdentity(_:)","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"getUserIdentity"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO","text":"GetUserIdentity"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO5InputV","text":"Input"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO","text":"GetUserIdentity"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15GetUserIdentityO6OutputO","text":"Output"}]},"https://www.discogs.com/developers#header-4.-send-a-post-request-to-the-discogs-access-token-url":{"identifier":"https:\/\/www.discogs.com\/developers#header-4.-send-a-post-request-to-the-discogs-access-token-url","titleInlineContent":[{"text":"4th step of the OAuth flow process","type":"text"}],"type":"link","title":"4th step of the OAuth flow process","url":"https:\/\/www.discogs.com\/developers#header-4.-send-a-post-request-to-the-discogs-access-token-url"},"doc://DiscogsService/documentation/DiscogsService/Operations":{"abstract":[{"type":"text","text":"API operations, with input and output types, generated from "},{"code":"#\/paths","type":"codeVoice"},{"text":" in the OpenAPI document.","type":"text"}],"title":"Operations","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"Operations","kind":"identifier"}],"role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","url":"\/documentation\/discogsservice\/operations","navigatorTitle":[{"text":"Operations","kind":"identifier"}],"type":"topic","kind":"symbol"}}} |