YandexMusic.DependencyInjection
0.7.0
dotnet add package YandexMusic.DependencyInjection --version 0.7.0
NuGet\Install-Package YandexMusic.DependencyInjection -Version 0.7.0
<PackageReference Include="YandexMusic.DependencyInjection" Version="0.7.0" />
<PackageVersion Include="YandexMusic.DependencyInjection" Version="0.7.0" />
<PackageReference Include="YandexMusic.DependencyInjection" />
paket add YandexMusic.DependencyInjection --version 0.7.0
#r "nuget: YandexMusic.DependencyInjection, 0.7.0"
#:package YandexMusic.DependencyInjection@0.7.0
#addin nuget:?package=YandexMusic.DependencyInjection&version=0.7.0
#tool nuget:?package=YandexMusic.DependencyInjection&version=0.7.0
YandexMusic.DependencyInjection
Dependency-injection integration for the YandexMusic client. Targets .NET 8, 9 and 10.
services.AddYandexMusic(options =>
{
options.Timeout = TimeSpan.FromSeconds(30);
options.DeviceId = "my-app";
});
Registers a scoped IYandexMusicClient over a handler pooled by IHttpClientFactory. Each scope
— an HTTP request, a signed-in user — gets its own authentication session, so access tokens never
leak between users, while the underlying connection pool is shared and long-lived. The client is
disposed with the scope.
Under DI the pooled handler is deliberately cookie-free: requests authenticate with the per-scope OAuth token, so a long-lived shared handler cannot carry one user's cookies into another user's request. The interactive cookie and QR sign-in flows use their own clients inside the library and are unaffected.
Related packages
| Package | Adds |
|---|---|
YandexMusic.Ynison |
The account's live playback state across its devices, and the remote. |
YandexMusic.Quasar |
Yandex speakers on the local network: discovery and direct control. |
Documentation: https://jrfrigat.github.io/YandexMusic/
⚠️ Unofficial library, not affiliated with Yandex. Use at your own risk and comply with the Yandex Music terms of use.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.DependencyInjection (>= 10.0.13)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.13)
- Microsoft.Extensions.Http (>= 10.0.13)
- YandexMusic (>= 0.7.0)
-
net8.0
- Microsoft.Extensions.DependencyInjection (>= 8.0.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Http (>= 8.0.1)
- YandexMusic (>= 0.7.0)
-
net9.0
- Microsoft.Extensions.DependencyInjection (>= 9.0.21)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.21)
- Microsoft.Extensions.Http (>= 9.0.21)
- YandexMusic (>= 0.7.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.