YandexMusicResolver 7.0.0
dotnet add package YandexMusicResolver --version 7.0.0
NuGet\Install-Package YandexMusicResolver -Version 7.0.0
<PackageReference Include="YandexMusicResolver" Version="7.0.0" />
paket add YandexMusicResolver --version 7.0.0
#r "nuget: YandexMusicResolver, 7.0.0"
// 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
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
Add nuget package to your project:
dotnet add package YandexMusicResolver
You need somehow to instantiate
YandexMusicMainResolver
.- If you are using dependency injection, use
.AddYandexMusicResolver()
to yourIServiceCollection
. 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:
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 useIHttpClientFactory
default HttpClient name isYandexMusic
.Create credentials provider instance (
YandexCredentialsProvider
this is the default implementation):var credentialProvider = new YandexMusicAuthService(authService, "Login", "Pass");
Create an instance of
YandexMusicMainResolver
and pass config to itvar yandexMusicMainResolver = new YandexMusicMainResolver(credentialProvider, httpClient);
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);
- If you are using dependency injection, use
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 | Versions 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. |
-
.NETStandard 2.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.1)
- Microsoft.Extensions.Http (>= 8.0.0)
- System.Text.Json (>= 8.0.4)
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 | 301 | 8/23/2024 |
6.0.0 | 114 | 8/9/2024 |
6.0.0-preview1 | 104 | 8/9/2024 |
5.1.0 | 341 | 3/5/2023 |
5.0.1 | 227 | 3/5/2023 |
5.0.0 | 214 | 3/5/2023 |
4.0.0 | 506 | 3/14/2021 |
3.3.1 | 403 | 3/7/2021 |
3.3.0 | 418 | 3/7/2021 |
3.2.0 | 300 | 2/19/2021 |
3.1.1 | 309 | 2/19/2021 |
3.1.0 | 315 | 2/19/2021 |
3.0.0 | 347 | 2/3/2021 |
2.2.1 | 340 | 1/28/2021 |
2.1.0 | 343 | 1/15/2021 |
2.0.0 | 347 | 1/10/2021 |
1.0.0 | 563 | 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