{"id":20850011,"url":"https://github.com/david-desmaisons/discogsclient","last_synced_at":"2026-03-16T00:13:58.314Z","repository":{"id":40937451,"uuid":"58947278","full_name":"David-Desmaisons/DiscogsClient","owner":"David-Desmaisons","description":"Discogs API C# Client","archived":false,"fork":false,"pushed_at":"2022-12-08T00:58:06.000Z","size":192,"stargazers_count":41,"open_issues_count":9,"forks_count":19,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-08-01T05:24:11.418Z","etag":null,"topics":["c-sharp","client","discogs"],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/David-Desmaisons.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-16T16:12:47.000Z","updated_at":"2024-12-01T09:50:44.000Z","dependencies_parsed_at":"2023-01-25T01:45:46.495Z","dependency_job_id":null,"html_url":"https://github.com/David-Desmaisons/DiscogsClient","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/David-Desmaisons/DiscogsClient","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/David-Desmaisons%2FDiscogsClient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/David-Desmaisons%2FDiscogsClient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/David-Desmaisons%2FDiscogsClient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/David-Desmaisons%2FDiscogsClient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/David-Desmaisons","download_url":"https://codeload.github.com/David-Desmaisons/DiscogsClient/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/David-Desmaisons%2FDiscogsClient/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271636034,"owners_count":24794144,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-22T02:00:08.480Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-sharp","client","discogs"],"created_at":"2024-11-18T03:07:41.963Z","updated_at":"2026-03-16T00:13:58.268Z","avatar_url":"https://github.com/David-Desmaisons.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DiscogsClient\n\n[![Build status](https://img.shields.io/appveyor/ci/David-Desmaisons/DiscogsClient.svg)](https://ci.appveyor.com/project/David-Desmaisons/DiscogsClient)\n[![NuGet Badge](https://img.shields.io/nuget/v/DiscogsClient.svg)](https://www.nuget.org/packages/DiscogsClient/)\n[![MIT License](https://img.shields.io/github/license/David-Desmaisons/DiscogsClient.svg)](https://github.com/David-Desmaisons/DiscogsClient/blob/master/LICENSE)\n\n\nC# Client library for [Discogs API v2.0](https://www.discogs.com/developers/)\n\nCheck demo application [Music.Cover.Finder](https://github.com/David-Desmaisons/Music.Cover.Finder)\n\n## Features\n* Include API to authorize user (generating OAuth1.0 token and token secret)\n* Full support to [DataBase API](https://www.discogs.com/developers/#page:database) including image download\n* Support of identity API\n* Transparent support of rate limit\n* Asynchroneous and cancellable API using Tasks\n* Transparent management of pagination using none blocking API (Reactive IObservable) or IEnumerable\n\n## Sample usage\n\n### Create discogs client\n\n#### Oauth authentication\n```C#\n  //Create authentication object using private and public keys: you should fournish real keys here\n  var oAuthCompleteInformation = new OAuthCompleteInformation(\"consumerKey\", \n                                  \"consumerSecret\", \"token\", \"tokenSecret\");\n  //Create discogs client using the authentication\n  var discogsClient = new DiscogsClient(oAuthCompleteInformation);\n```\n#### Token based authentication\n```C#\n  //Create authentication based on Discogs token\n  var tokenInformation = new TokenAuthenticationInformation(\"my-token\");\n  //Create discogs client using the authentication\n  var discogsClient = new DiscogsClient(tokenInformation);\n```\n#### Search The DataBase\n\nUsing IObservable:\n```C#\nvar discogsSearch = new DiscogsSearch()\n{\n  artist = \"Ornette Coleman\",\n  release_title = \"The Shape Of Jazz To Come\"\n};\n    \n//Retrieve observable result from search\nvar observable = _DiscogsClient.Search(discogsSearch);\n```\n\nUsing IEnumerable:\n```C#\n//Alternatively retreive same result as enumerable \nvar enumerable = _DiscogsClient.SearchAsEnumerable(discogsSearch);\n```\n\n#### Get Release, Master, Artist or Label Information\n```C#\nvar release = await _DiscogsClient.GetReleaseAsync(1704673);\n```\n\n```C#\nvar master = await _DiscogsClient.GetMasterAsync(47813);\n```\n\n```C#\nvar artist = await _DiscogsClient.GetArtistAsync(224506);\n```\n\n```C#\nvar label = await _DiscogsClient.GetLabelAsync(125);\n```\n\n#### Download Image\n```C#\n//Retrieve Release information\nvar res = await _DiscogsClient.GetMasterAsync(47813);\n  \n//Download the first image of the release\nawait _DiscogsClient.SaveImageAsync(res.images[0], Path.GetTempPath(), \"Ornette-TSOAJTC\");\n```\n\n#### OAuth: Authorize new user\n```C#\n//Create authentificator information: you should fournish real keys here\nvar oAuthConsumerInformation = new OAuthConsumerInformation(\"consumerKey\", \"consumerSecret\");\n  \n//Create Authentifier client\nvar discogsAuthentifierClient = new DiscogsAuthentifierClient(oAuthConsumerInformation);\n\n//Retreive Token and Token secret \nvar oauth = discogsClient.Authorize(s =\u003e Task.FromResult(GetToken(s))).Result;\n```\n\nAuthorize takes a Func\u003c string, Task\u003c string\u003e\u003e as parameter, receiving the authentication url and returning the corresponding access key. Trivial implementation:\n\n```C#\nprivate static string GetToken(string url)\n{\n  Console.WriteLine(\"Please authorize the application and enter the final key in the console\");\n  Process.Start(url);\n  return Console.ReadLine();\n}\n```\nSee [DiscogsClientTest](https://github.com/David-Desmaisons/DiscogsClient/blob/master/DiscogsClient.Test/DiscogsClientTest.cs) and [DiscogsAuthenticationConsole](https://github.com/David-Desmaisons/DiscogsClient/blob/master/DiscogsAuthenticationConsole/Program.cs) for full samples of available APIs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavid-desmaisons%2Fdiscogsclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavid-desmaisons%2Fdiscogsclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavid-desmaisons%2Fdiscogsclient/lists"}