https://github.com/insire/monstercatnet
MonstercatNet is a .NET wrapper around the API that drives monstercat.com written in C#
https://github.com/insire/monstercatnet
api hacktoberfest monstercat monstercat-api wrapper-library
Last synced: 6 months ago
JSON representation
MonstercatNet is a .NET wrapper around the API that drives monstercat.com written in C#
- Host: GitHub
- URL: https://github.com/insire/monstercatnet
- Owner: Insire
- License: mit
- Created: 2020-09-20T07:06:17.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2025-03-15T09:49:39.000Z (7 months ago)
- Last Synced: 2025-04-12T06:54:39.276Z (6 months ago)
- Topics: api, hacktoberfest, monstercat, monstercat-api, wrapper-library
- Language: C#
- Homepage:
- Size: 281 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# MonstercatNet
[](https://github.com/Insire/MonstercatNet/blob/master/LICENSE.md)
[](https://www.nuget.org/packages/MonstercatNet/)
[](https://dev.azure.com/SoftThorn/MonstercatNet/_build/latest?definitionId=3)
[](https://www.codefactor.io/repository/github/insire/monstercatnet)
[](https://codecov.io/gh/Insire/MonstercatNet)MonstercatNet is a .NET wrapper around the API that drives [monstercat.com](https://www.monstercat.com/) written in C#.
## Supported Platforms
Since this library relies on [refit](https://github.com/reactiveui/refit) for setting up the API endpoints, there are limitations. You can find the limitations [here](https://github.com/reactiveui/refit#where-does-this-work).
## Installation
You can find the latest nuget package [here](https://www.nuget.org/packages/MonstercatNet/).
## Changelog
See [here](CHANGELOG.md)
## Usage
### creating the api client
```cs
using SoftThorn.MonstercatNet;var httpClient = new HttpClient().UseMonstercatApiV2();
var client = MonstercatApi.Create(httpClient);
```### creating the cdn client
```cs
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.
### signing in
```cs
using SoftThorn.MonstercatNet;var credentials = new ApiCredentials()
{
Email = "", // your account e-mail
Password = "" // your password
};await client.Login(credentials);
```### searching for music
```cs
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" },
});
```### getting albumns, EPs and singles (releases)
```cs
using SoftThorn.MonstercatNet;var releases = await client.GetReleases(new ReleaseBrowseRequest()
{
Limit = 1,
Skip = 0
});
```### getting release details
```cs
using SoftThorn.MonstercatNet;var release = await client.GetRelease("the release catalogId which looks like this MCRLX001-8");
```### getting release cover
```cs
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);
```## Endpoints
The currently implemented and supported endpoints can be found [here](endpoints.md)
## Versions
See [here](versioning.md)
## Contributing
See [here](CONTRIBUTING.md)
----
A special thanks goes out to [defvs](https://github.com/defvs/connect-v2-docs) who with many others documented the unofficial API.