Soenneker.Asana.OpenApiClientUtil
11.0.265
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.Asana.OpenApiClientUtil --version 11.0.265
NuGet\Install-Package Soenneker.Asana.OpenApiClientUtil -Version 11.0.265
<PackageReference Include="Soenneker.Asana.OpenApiClientUtil" Version="11.0.265" />
<PackageVersion Include="Soenneker.Asana.OpenApiClientUtil" Version="11.0.265" />
<PackageReference Include="Soenneker.Asana.OpenApiClientUtil" />
paket add Soenneker.Asana.OpenApiClientUtil --version 11.0.265
#r "nuget: Soenneker.Asana.OpenApiClientUtil, 11.0.265"
#:package Soenneker.Asana.OpenApiClientUtil@11.0.265
#addin nuget:?package=Soenneker.Asana.OpenApiClientUtil&version=11.0.265
#tool nuget:?package=Soenneker.Asana.OpenApiClientUtil&version=11.0.265
Soenneker.Asana.OpenApiClientUtil
Creates and caches an authenticated AsanaOpenApiClient for dependency-injected applications.
Installation
dotnet add package Soenneker.Asana.OpenApiClientUtil
Configuration
{
"Asana": {
"ApiKey": "your-personal-access-token"
}
}
Asana:ApiKey is required. The default base URL is https://app.asana.com/api/1.0, and the default authentication format is Authorization: Bearer {token}. Asana:ClientBaseUrl, Asana:AuthHeaderName, and Asana:AuthHeaderValueTemplate can override those values.
Registration
using Soenneker.Asana.OpenApiClientUtil.Registrars;
services.AddAsanaOpenApiClientUtilAsScoped();
The scoped utility uses a singleton HTTP-client provider, so ending a scope does not remove the shared cached HttpClient. Use AddAsanaOpenApiClientUtilAsSingleton() when the generated client should also be shared application-wide.
Usage
using Soenneker.Asana.OpenApiClient;
using Soenneker.Asana.OpenApiClient.Models;
using Soenneker.Asana.OpenApiClientUtil.Abstract;
public sealed class CurrentAsanaUserService
{
private readonly IAsanaOpenApiClientUtil _clientUtil;
public CurrentAsanaUserService(IAsanaOpenApiClientUtil clientUtil)
{
_clientUtil = clientUtil;
}
public async Task<UserResponseData?> Get(CancellationToken cancellationToken = default)
{
AsanaOpenApiClient client = await _clientUtil.Get(cancellationToken);
return await client.Users["me"].GetAsync(cancellationToken: cancellationToken);
}
}
Get() lazily creates one generated client per utility instance and returns it afterward. Authentication and base-address configuration are captured during initial creation. Credentials are added only to HTTPS requests and are pinned to the first request host. Let the dependency-injection container dispose resolved utilities.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Soenneker.Asana.HttpClients (>= 11.0.167)
- Soenneker.Asana.OpenApiClient (>= 11.0.113)
- Soenneker.Kiota.GenericAuthenticationProvider (>= 11.0.59)
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.274 | 0 | 11/11/2026 |
| 11.0.272 | 42 | 11/10/2026 |
| 11.0.271 | 113 | 11/5/2026 |
| 11.0.270 | 93 | 11/3/2026 |
| 11.0.269 | 87 | 11/3/2026 |
| 11.0.268 | 90 | 11/3/2026 |
| 11.0.267 | 90 | 11/3/2026 |
| 11.0.266 | 88 | 11/3/2026 |
| 11.0.265 | 91 | 11/3/2026 |
| 11.0.264 | 87 | 11/3/2026 |
| 11.0.263 | 89 | 11/3/2026 |
| 11.0.262 | 101 | 11/2/2026 |
| 11.0.261 | 100 | 11/2/2026 |
| 11.0.260 | 105 | 10/31/2026 |
| 11.0.259 | 95 | 10/31/2026 |
| 11.0.258 | 96 | 10/30/2026 |
| 11.0.257 | 93 | 10/29/2026 |
| 11.0.256 | 94 | 10/28/2026 |
| 11.0.255 | 101 | 10/27/2026 |
| 11.0.254 | 98 | 10/27/2026 |
Updated Soenneker.Asana.HttpClients to 11.0.167