Skip to content

mlnrdns/discogsharp

Repository files navigation

discogsharp

Github Actions License: MIT

.NET library to access Discogs API.

Features

  • Authentication with Discogs auth flow (both personal access token and key/password is supported)
  • Full support for:
  • Rate limit can be added
  • Full asynchronous and cancellable operation
  • Pagination is supported

Coming soon

  • OAuth authentication
  • Full Discogs API implementation
  • Discogs monthly dump processing
  • Unit tests

How it works

Creating the client service

var discogsConnection = DiscogsAuthConnection.WithPersonalAccessToken("personalAccessTokenValue");
var databaseService = discogsConnection.CreateDatabaseService();

Running some queries

var artist = await databaseService.GetArtistAsync(92973);
var release = await databaseService.GetReleaseAsync(3408576);
var newRating = await databaseService.AddOrUpdateReleaseRatingByUserAsync(3408576, "username", 5);

Searching the database

var filter = new SearchFilter()
{
    Artist = "Ulver",
    ReleaseTitle = "Bergtatt"
};
var searchResult = await databaseService.SearchAsync(filter);