KnoqNet 2.5.16

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

dotnet-knoq

.NET client library for the knoQ API.

The source code is generated from the OpenAPI Spec for the knoQ 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 (KNOQ_BASE_ADDRESS and KNOQ_COOKIE_TOKEN) is added to the service collection.

var host = Host.CreateDefaultApplication(args)
    .ConfigureServices((ctx, services) =>
    {
        services.AddKnoqApiClient(options =>
        {
            var conf = ctx.Configuration;
            options.BaseAddress = conf["KNOQ_BASE_ADDRESS"];
            options.CookieAuthToken = conf["KNOQ_COOKIE_TOKEN"];
        });
    })
    .Build();

host.Run();

You can also separate configurator from the AddKnoqApiClient method by using parameterless method. In the following code, the added KnoqApiClient automatically use configured KnoqApiClientOptions.

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

host.Run();

Create API Client Manually

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

KnoqApiClientOptions options = new()
{
    BaseAddress = "Base address of the knoQ API",
    CookieAuthToken = "Cookie authentication token"
}
var client = KnoqApiClientHelper.CreateFromOptions(options);

The KnoqApiClient class implements Microsoft.Kiota.Abstractions.BaseRequestBuilder so that you can manually manage methods to access the knoQ 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 knoQ, set it to the KNOQ_TAG_NAME variable and run task, task gen or task generate-client.

The following command generates API client for knoQ v2.5.12.

KNOQ_TAG_NAME="v2.5.12" task
Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on KnoqNet:

Package Downloads
KnoqNet.Extensions.Authentication

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

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.5.16 133 10/22/2026
1.0.0-alpha.2 325 11/26/2025
1.0.0-alpha.1 207 10/30/2025
0.3.1 349 6/18/2025
0.3.0 368 6/17/2025 0.3.0 is deprecated because it has critical bugs.
0.2.0 293 6/5/2025

Add supports for knoQ API v2.5.16.