KnoqNet 2.5.16
dotnet add package KnoqNet --version 2.5.16
NuGet\Install-Package KnoqNet -Version 2.5.16
<PackageReference Include="KnoqNet" Version="2.5.16" />
<PackageVersion Include="KnoqNet" Version="2.5.16" />
<PackageReference Include="KnoqNet" />
paket add KnoqNet --version 2.5.16
#r "nuget: KnoqNet, 2.5.16"
#:package KnoqNet@2.5.16
#addin nuget:?package=KnoqNet&version=2.5.16
#tool nuget:?package=KnoqNet&version=2.5.16
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 | Versions 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. |
-
net10.0
- CommunityToolkit.Diagnostics (>= 8.4.2)
- Microsoft.Extensions.Hosting (>= 10.0.13)
- Microsoft.Kiota.Bundle (>= 2.1.2)
-
net8.0
- CommunityToolkit.Diagnostics (>= 8.4.2)
- Microsoft.Extensions.Hosting (>= 10.0.13)
- Microsoft.Kiota.Bundle (>= 2.1.2)
-
net9.0
- CommunityToolkit.Diagnostics (>= 8.4.2)
- Microsoft.Extensions.Hosting (>= 10.0.13)
- Microsoft.Kiota.Bundle (>= 2.1.2)
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.2.0 | 293 | 6/5/2025 |
Add supports for knoQ API v2.5.16.