YandexMusicResolver 7.0.0

dotnet add package YandexMusicResolver --version 7.0.0                
NuGet\Install-Package YandexMusicResolver -Version 7.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="YandexMusicResolver" Version="7.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add YandexMusicResolver --version 7.0.0                
#r "nuget: YandexMusicResolver, 7.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install YandexMusicResolver as a Cake Addin
#addin nuget:?package=YandexMusicResolver&version=7.0.0

// Install YandexMusicResolver as a Cake Tool
#tool nuget:?package=YandexMusicResolver&version=7.0.0                

alternate text is missing from this package README image YandexMusicResolver

A library aimed at searching, resolving and getting direct links to tracks, playlists or albums in Yandex.Music.
Can work without authorization.

Getting started

  1. Add nuget package to your project:

    dotnet add package YandexMusicResolver
    
  2. You need somehow to instantiate YandexMusicMainResolver.

    • If you are using dependency injection, use .AddYandexMusicResolver() to your IServiceCollection. E.g.:
      var serviceCollection = new ServiceCollection();
      serviceCollection.AddYandexMusicResolver();
      
      var serviceProvider = serviceCollection.BuildServiceProvider();
      // Resolve the IYandexMusicMainResolver
      var yandexMusicMainResolver = serviceProvider.GetRequiredService<IYandexMusicMainResolver>();
      
    • Or instantiate it as usually:
      1. Create auth service instance (YandexMusicAuthService this is the default implementation):

        var authService = new YandexMusicAuthService(httpClient);
        

        Actually, preferred way is to use IHttpClientFactory to pass it to all services. If you use IHttpClientFactory default HttpClient name is YandexMusic.

      2. Create credentials provider instance (YandexCredentialsProvider this is the default implementation):

        var credentialProvider = new YandexMusicAuthService(authService, "Login", "Pass");
        
      3. Create an instance of YandexMusicMainResolver and pass config to it

        var yandexMusicMainResolver = new YandexMusicMainResolver(credentialProvider, httpClient);
        
      Full example:
      var httpClient = new HttpClient();
      var authService = new YandexMusicAuthService.Create(httpClient);
      var credentialProvider = new YandexMusicAuthService.Create(authService, "Login", "Pass");
      var yandexMusicMainResolver = new YandexMusicMainResolver.Create(credentialProvider, httpClient);
      
  3. After that you can use different methods and properties of IYandexMusicMainResolver. Example code for getting direct track download url:

    var directUrl = await yandexMusicMainResolver.DirectUrlLoader.GetDirectUrl("55561798");
    Console.WriteLine(directUrl);
    

    [!IMPORTANT]
    Yandex will return a link to a 30-seconds track if you do not log in (do not use a config with a valid token).

You can take a look at unit test project for additional examples.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
7.0.0 242 8/23/2024
6.0.0 106 8/9/2024
6.0.0-preview1 102 8/9/2024
5.1.0 337 3/5/2023
5.0.1 223 3/5/2023
5.0.0 210 3/5/2023
4.0.0 500 3/14/2021
3.3.1 397 3/7/2021
3.3.0 412 3/7/2021
3.2.0 292 2/19/2021
3.1.1 303 2/19/2021
3.1.0 309 2/19/2021
3.0.0 341 2/3/2021
2.2.1 334 1/28/2021
2.1.0 337 1/15/2021
2.0.0 341 1/10/2021
1.0.0 557 1/9/2021

## What's Changed
* Add dependency injection support by @SKProCH in https://github.com/SKProCH/YandexMusicResolver/pull/7


**Full Changelog**: https://github.com/SKProCH/YandexMusicResolver/compare/v6.0.0...v7.0.0