Traq 3.27.1

dotnet add package Traq --version 3.27.1
                    
NuGet\Install-Package Traq -Version 3.27.1
                    
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="Traq" Version="3.27.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Traq" Version="3.27.1" />
                    
Directory.Packages.props
<PackageReference Include="Traq" />
                    
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 Traq --version 3.27.1
                    
#r "nuget: Traq, 3.27.1"
                    
#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 Traq@3.27.1
                    
#: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=Traq&version=3.27.1
                    
Install as a Cake Addin
#tool nuget:?package=Traq&version=3.27.1
                    
Install as a Cake Tool

dotnet-traq

.NET client library for the traQ API.

The source code is generated from the OpenAPI Spec for the traQ API by Microsoft Kiota.

How to Use

Use in Generic Host

An extension method for the IServiceCollection type can be used.

In the sample code below, an instance of the TraqApiClient class configured by environment variables (TRAQ_BASE_ADDRESS and TRAQ_ACCESS_TOKEN) is added to the service collection.

var host = Host.CreateDefaultApplication(args)
    .ConfigureServices((ctx, services) =>
    {
        services.AddTraqApiClient(options =>
        {
            var conf = ctx.Configuration;
            options.BaseAddress = conf["TRAQ_BASE_ADDRESS"];
            options.BearerAuthToken = conf["TRAQ_ACCESS_TOKEN"];
        });
    })
    .Build();

host.Run();

You can also separate configurator from the AddTraqApiClient method by using parameterless method. In the following code, the added TraqApiClient automatically use configured TraqApiClientOptions.

var host = Host.CreateDefaultApplication(args)
    .ConfigureServices((ctx, services) =>
    {
        services.Configure<TraqApiClientOptions>(ctx.Configuration);
        services.AddTraqApiClient();
    })
    .Build();

host.Run();

Configure Options

The TraqApiClientOptions class is used to configure the TraqApiClient instance.

You must fill the BaseAddress property to access the traQ API.

You can also set the BearerAuthToken, CookieAuthToken, and AuthMethodPreference properties to configure authentication.

Create API Client Manually

The CreateFromOptions method in the TraqApiClientHelper class is useful to create a new instance of the TraqApiClient class with specified options.

TraqApiClientOptions options = new()
{
    BaseAddress = "Base address of the traQ API",
    BearerAuthToken = "Bearer authentication token"
}
var client = TraqApiClientHelper.CreateFromOptions(options);

The TraqApiClient class implements Microsoft.Kiota.Abstractions.BaseRequestBuilder so that you can manually manage methods to access the traQ API.

For more information, please check Kiota Official Documentation.

Source Generation

Docker and Task are required for source generation.

To generate API client for certain version of traQ, set it to the TRAQ_TAG_NAME variable and run task gen or task generate-client.

The following command generates API client for traQ v3.27.0.

TRAQ_TAG_NAME="v3.27.0" task gen
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Traq:

Package Downloads
KnoqNet.Extensions.Authentication

A dotnet extension library for the knoQ API that provides authentication methods with traQ service.

Traq.Bot

A .NET library for traQ BOT works with WebSocker or HttpServer.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.27.1 291 12/14/2025
3.27.1-rc.0 102 12/14/2025
1.0.0-alpha.1 281 8/17/2025
0.4.0 337 5/2/2025
0.3.0 403 2/2/2025
0.2.1 146 1/27/2025
0.2.0 172 1/27/2025 0.2.0 is deprecated because it has critical bugs.
0.1.0 264 1/14/2025

Add support for NET Standard 2.0 and 2.1.