MonstercatNet is a .NET wrapper around the API that drives monstercat.com written in C#.
Since this library relies on refit for setting up the API endpoints, there are limitations. You can find the limitations here.
You can find the latest nuget package here.
See here
using SoftThorn.MonstercatNet;
var httpClient = new HttpClient().UseMonstercatApiV2();
var client = MonstercatApi.Create(httpClient);
using SoftThorn.MonstercatNet;
var httpClient = new HttpClient().UseMonstercatCdn();
var client = MonstercatCdn.Create(httpClient);
NOTE: The HttpClient
for the CDN should be a different instance than the one for the API, as they use a different BaseAddress.
using SoftThorn.MonstercatNet;
var credentials = new ApiCredentials()
{
Email = "", // your account e-mail
Password = "" // your password
};
await client.Login(credentials);
using SoftThorn.MonstercatNet;
var tracks = await client.SearchTracks(new TrackSearchRequest()
{
Limit = 1,
Skip = 0,
Creatorfriendly = true,
Genres = new[] { "Drumstep" },
ReleaseTypes = new[] { "Album" },
Tags = new[] { "Uncaged", "Energetic" },
});
using SoftThorn.MonstercatNet;
var releases = await client.GetReleases(new ReleaseBrowseRequest()
{
Limit = 1,
Skip = 0
});
using SoftThorn.MonstercatNet;
var release = await client.GetRelease("the release catalogId which looks like this MCRLX001-8");
using SoftThorn.MonstercatNet;
var cdn = MonstercatCdn.Create(new HttpClient(new HttpLoggingHandler()).UseMonstercatCdn());
var builder = ReleaseCoverArtBuilder
.Create()
.ForRelease(new TrackRelease() { CatalogId = "the release catalog Id which looks like this 2FMCS1347" };);
var releaseCoverBytes = await cdn.GetReleaseCoverAsByteArray(builder);
var releaseCoverStream = await cdn.GetReleaseCoverAsStream(builder);
The currently implemented and supported endpoints can be found here
See here
See here
A special thanks goes out to defvs who with many others documented the unofficial API.