Soenneker.DigitalOcean.OpenApiClientUtil
4.0.81
Prefix Reserved
dotnet add package Soenneker.DigitalOcean.OpenApiClientUtil --version 4.0.81
NuGet\Install-Package Soenneker.DigitalOcean.OpenApiClientUtil -Version 4.0.81
<PackageReference Include="Soenneker.DigitalOcean.OpenApiClientUtil" Version="4.0.81" />
<PackageVersion Include="Soenneker.DigitalOcean.OpenApiClientUtil" Version="4.0.81" />
<PackageReference Include="Soenneker.DigitalOcean.OpenApiClientUtil" />
paket add Soenneker.DigitalOcean.OpenApiClientUtil --version 4.0.81
#r "nuget: Soenneker.DigitalOcean.OpenApiClientUtil, 4.0.81"
#:package Soenneker.DigitalOcean.OpenApiClientUtil@4.0.81
#addin nuget:?package=Soenneker.DigitalOcean.OpenApiClientUtil&version=4.0.81
#tool nuget:?package=Soenneker.DigitalOcean.OpenApiClientUtil&version=4.0.81
Soenneker.DigitalOcean.OpenApiClientUtil
Provides a lazily created, cached DigitalOcean API client backed by the configured DigitalOcean HTTP provider.
Installation
dotnet add package Soenneker.DigitalOcean.OpenApiClientUtil
Configuration
{
"DigitalOcean": {
"AccessToken": "your-personal-access-token"
}
}
Store the token in user secrets, environment-backed configuration, or a secret manager rather than source control.
Registration
using Soenneker.DigitalOcean.OpenApiClientUtil.Registrars;
services.AddDigitalOceanOpenApiClientUtilAsScoped();
The scoped registration creates one cached generated client per dependency-injection scope while retaining the underlying DigitalOcean HTTP client as a singleton. Disposing the util at the end of a scope does not destroy that shared transport.
Use AddDigitalOceanOpenApiClientUtilAsSingleton() when the generated-client holder should also live for the application lifetime.
Usage
using Soenneker.DigitalOcean.OpenApiClient;
using Soenneker.DigitalOcean.OpenApiClient.Models;
using Soenneker.DigitalOcean.OpenApiClientUtil.Abstract;
public sealed class DropletReader(IDigitalOceanOpenApiClientUtil clientUtil)
{
public async Task<IReadOnlyList<Droplet>> GetPage(
int page,
CancellationToken cancellationToken)
{
DigitalOceanOpenApiClient client = await clientUtil.Get(cancellationToken);
AllDropletsResponse? response = await client.V2.Droplets.GetAsync(
request =>
{
request.QueryParameters.Page = page;
request.QueryParameters.PerPage = 50;
},
cancellationToken);
return response?.Droplets ?? [];
}
}
Get returns the same generated client for the lifetime of the util. Pass cancellation tokens to both Get and API operations. Pagination remains explicit; inspect response links or metadata and request additional pages as needed.
DigitalOcean error responses are surfaced through the generated client’s Kiota error models. Handle authentication failures, rate limiting, and transient transport errors according to the caller’s retry policy.
Optional DigitalOcean:ClientBaseUrl, DigitalOcean:AuthHeaderName, and DigitalOcean:AuthHeaderValueTemplate settings are supported by the transport package. Treat them as trusted configuration because they determine where and how credentials are sent.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- Soenneker.DigitalOcean.HttpClients (>= 4.0.64)
- Soenneker.DigitalOcean.OpenApiClient (>= 4.0.35)
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 |
|---|---|---|
| 4.0.81 | 0 | 10/7/2026 |
| 4.0.80 | 88 | 10/4/2026 |
| 4.0.79 | 86 | 10/2/2026 |
| 4.0.78 | 89 | 10/1/2026 |
| 4.0.77 | 81 | 10/1/2026 |
| 4.0.76 | 95 | 9/30/2026 |
| 4.0.75 | 85 | 9/29/2026 |
| 4.0.74 | 93 | 9/29/2026 |
| 4.0.73 | 84 | 9/29/2026 |
| 4.0.72 | 93 | 9/26/2026 |
| 4.0.71 | 90 | 9/25/2026 |
| 4.0.70 | 88 | 9/25/2026 |
| 4.0.69 | 89 | 9/25/2026 |
| 4.0.68 | 88 | 9/24/2026 |
| 4.0.67 | 86 | 9/24/2026 |
| 4.0.66 | 96 | 9/23/2026 |
| 4.0.65 | 99 | 9/22/2026 |
| 4.0.64 | 102 | 9/19/2026 |
| 4.0.63 | 91 | 9/18/2026 |
| 4.0.62 | 89 | 9/17/2026 |