Soenneker.Bunny.OpenApiClientUtil
11.0.287
Prefix Reserved
dotnet add package Soenneker.Bunny.OpenApiClientUtil --version 11.0.287
NuGet\Install-Package Soenneker.Bunny.OpenApiClientUtil -Version 11.0.287
<PackageReference Include="Soenneker.Bunny.OpenApiClientUtil" Version="11.0.287" />
<PackageVersion Include="Soenneker.Bunny.OpenApiClientUtil" Version="11.0.287" />
<PackageReference Include="Soenneker.Bunny.OpenApiClientUtil" />
paket add Soenneker.Bunny.OpenApiClientUtil --version 11.0.287
#r "nuget: Soenneker.Bunny.OpenApiClientUtil, 11.0.287"
#:package Soenneker.Bunny.OpenApiClientUtil@11.0.287
#addin nuget:?package=Soenneker.Bunny.OpenApiClientUtil&version=11.0.287
#tool nuget:?package=Soenneker.Bunny.OpenApiClientUtil&version=11.0.287
Soenneker.Bunny.OpenApiClientUtil
Creates and caches an authenticated BunnyOpenApiClient for dependency-injected applications.
Installation
dotnet add package Soenneker.Bunny.OpenApiClientUtil
Configuration
{
"Bunny": {
"ApiKey": "your-access-key"
}
}
Bunny:ApiKey is required. The defaults are https://api.bunny.net and AccessKey: {token}. Bunny:ClientBaseUrl, Bunny:AuthHeaderName, and Bunny:AuthHeaderValueTemplate can override them.
The generated client combines products that use different hosts and credentials. Configure one utility per host/credential set; specialized storage, Stream, JWT, and other endpoints may need different settings.
Registration
using Soenneker.Bunny.OpenApiClientUtil.Registrars;
services.AddBunnyOpenApiClientUtilAsScoped();
The scoped utility borrows a singleton HTTP-client provider. Ending a scope disposes its generated client state but leaves the singleton provider and HttpClient alive. Use AddBunnyOpenApiClientUtilAsSingleton() to share the generated client too.
Usage
using Soenneker.Bunny.OpenApiClient;
using Soenneker.Bunny.OpenApiClient.Models;
using Soenneker.Bunny.OpenApiClientUtil.Abstract;
public sealed class PullZoneService
{
private readonly IBunnyOpenApiClientUtil _clientUtil;
public PullZoneService(IBunnyOpenApiClientUtil clientUtil) => _clientUtil = clientUtil;
public async Task<List<PullZoneModel>?> Get(CancellationToken cancellationToken = default)
{
BunnyOpenApiClient client = await _clientUtil.Get(cancellationToken);
return await client.Core.Pullzone.GetAsync(cancellationToken: cancellationToken);
}
}
Get() lazily creates one generated client per utility instance. Configuration is captured during creation. Credentials are added only to HTTPS requests and are pinned to the first request host.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Soenneker.Bunny.HttpClients (>= 11.0.178)
- Soenneker.Bunny.OpenApiClient (>= 11.0.134)
- Soenneker.Kiota.GenericAuthenticationProvider (>= 11.0.65)
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 |
|---|---|---|
| 11.0.287 | 50 | 12/3/2026 |
| 11.0.286 | 51 | 12/3/2026 |
| 11.0.285 | 76 | 12/3/2026 |
| 11.0.284 | 71 | 12/3/2026 |
| 11.0.283 | 77 | 12/3/2026 |
| 11.0.282 | 73 | 12/3/2026 |
| 11.0.281 | 72 | 12/2/2026 |
| 11.0.280 | 73 | 12/2/2026 |
| 11.0.278 | 73 | 12/2/2026 |
| 11.0.277 | 85 | 12/2/2026 |
| 11.0.276 | 87 | 12/2/2026 |
| 11.0.275 | 87 | 12/2/2026 |
| 11.0.274 | 88 | 12/2/2026 |
| 11.0.273 | 87 | 12/1/2026 |
| 11.0.272 | 85 | 12/1/2026 |
| 11.0.271 | 86 | 12/1/2026 |
| 11.0.270 | 86 | 12/1/2026 |
| 11.0.269 | 87 | 12/1/2026 |
| 11.0.268 | 98 | 12/1/2026 |
| 11.0.267 | 94 | 11/30/2026 |
Updated Multiple NuGet packages