/YandexMusicApiClient

Unofficial client for Yandex.Music API written in C#/.NET

Primary LanguageC#MIT LicenseMIT

Yandex.Music API client (unofficial)

Yandex.Music API client

License NuGet version NuGet downloads

Unofficial client for Yandex.Music API written in C#/.NET

Quick start

You can find package on NuGet

Install from Package Managers

.NET CLI

dotnet add package YandexMusicApi.Client

Package Manager

Install-Package YandexMusicApi.Client

Creating a client

To register it with DI container

// with authorization token:
services.AddAuthorizedYandexMusicApiClient("token");
// else
services.AddGuestYandexMusicApiClient();

Using without DI container

// with authorization token:
var client = new YandexMusicClient(RestClient.Authorized("token"));
// else
var client = new YandexMusicClient();

Example

using System;
using YandexMusicApi.Client;

class Program
{
    static async Task Main()
    {
        var client = new YandexMusicClient();
        
        var track = await client.Tracks.GetAsync("trackId"); // get track by id
        
        var albums = await client.Albums.SearchAsync("album title"); // search for albums by title
        
        var genres = await client.Genres.GetAsync(); // get all genres
    }
}

Documentation

Coming soon...