Soenneker.Asana.OpenApiClientUtil
4.0.185
Prefix Reserved
See the version list below for details.
dotnet add package Soenneker.Asana.OpenApiClientUtil --version 4.0.185
NuGet\Install-Package Soenneker.Asana.OpenApiClientUtil -Version 4.0.185
<PackageReference Include="Soenneker.Asana.OpenApiClientUtil" Version="4.0.185" />
<PackageVersion Include="Soenneker.Asana.OpenApiClientUtil" Version="4.0.185" />
<PackageReference Include="Soenneker.Asana.OpenApiClientUtil" />
paket add Soenneker.Asana.OpenApiClientUtil --version 4.0.185
#r "nuget: Soenneker.Asana.OpenApiClientUtil, 4.0.185"
#:package Soenneker.Asana.OpenApiClientUtil@4.0.185
#addin nuget:?package=Soenneker.Asana.OpenApiClientUtil&version=4.0.185
#tool nuget:?package=Soenneker.Asana.OpenApiClientUtil&version=4.0.185
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 | 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.Asana.HttpClients (>= 4.0.117)
- Soenneker.Asana.OpenApiClient (>= 4.0.71)
- Soenneker.Kiota.GenericAuthenticationProvider (>= 4.0.44)
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.195 | 44 | 9/13/2026 |
| 4.0.194 | 39 | 9/13/2026 |
| 4.0.193 | 45 | 9/13/2026 |
| 4.0.192 | 48 | 9/13/2026 |
| 4.0.191 | 48 | 9/12/2026 |
| 4.0.190 | 46 | 9/12/2026 |
| 4.0.189 | 44 | 9/12/2026 |
| 4.0.188 | 47 | 9/12/2026 |
| 4.0.187 | 49 | 9/12/2026 |
| 4.0.185 | 93 | 9/10/2026 |
| 4.0.184 | 80 | 9/9/2026 |
| 4.0.183 | 85 | 9/9/2026 |
| 4.0.182 | 83 | 9/8/2026 |
| 4.0.181 | 78 | 9/8/2026 |
| 4.0.180 | 91 | 9/8/2026 |
| 4.0.179 | 98 | 9/8/2026 |
| 4.0.178 | 89 | 9/8/2026 |
| 4.0.177 | 98 | 9/7/2026 |
| 4.0.176 | 108 | 9/7/2026 |
| 4.0.175 | 104 | 9/6/2026 |