Soenneker.Asana.OpenApiClientUtil 4.0.158

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Asana.OpenApiClientUtil --version 4.0.158
                    
NuGet\Install-Package Soenneker.Asana.OpenApiClientUtil -Version 4.0.158
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Asana.OpenApiClientUtil" Version="4.0.158" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Asana.OpenApiClientUtil" Version="4.0.158" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Asana.OpenApiClientUtil" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Asana.OpenApiClientUtil --version 4.0.158
                    
#r "nuget: Soenneker.Asana.OpenApiClientUtil, 4.0.158"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Asana.OpenApiClientUtil@4.0.158
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Asana.OpenApiClientUtil&version=4.0.158
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Asana.OpenApiClientUtil&version=4.0.158
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.161 32 9/3/2026
4.0.160 53 9/1/2026
4.0.159 48 9/1/2026
4.0.158 51 9/1/2026
4.0.157 58 8/31/2026
4.0.156 53 8/31/2026
4.0.155 57 8/31/2026
4.0.154 58 8/31/2026
4.0.153 58 8/31/2026
4.0.152 66 8/30/2026
4.0.151 55 8/30/2026
4.0.150 60 8/30/2026
4.0.149 65 8/30/2026
4.0.148 60 8/30/2026
4.0.147 64 8/29/2026
4.0.146 70 8/29/2026
4.0.145 95 8/26/2026
4.0.144 89 8/26/2026
4.0.143 86 8/26/2026
4.0.142 93 8/22/2026
Loading failed