Soenneker.GitHub.OpenApiClient
4.0.236
Prefix Reserved
dotnet add package Soenneker.GitHub.OpenApiClient --version 4.0.236
NuGet\Install-Package Soenneker.GitHub.OpenApiClient -Version 4.0.236
<PackageReference Include="Soenneker.GitHub.OpenApiClient" Version="4.0.236" />
<PackageVersion Include="Soenneker.GitHub.OpenApiClient" Version="4.0.236" />
<PackageReference Include="Soenneker.GitHub.OpenApiClient" />
paket add Soenneker.GitHub.OpenApiClient --version 4.0.236
#r "nuget: Soenneker.GitHub.OpenApiClient, 4.0.236"
#:package Soenneker.GitHub.OpenApiClient@4.0.236
#addin nuget:?package=Soenneker.GitHub.OpenApiClient&version=4.0.236
#tool nuget:?package=Soenneker.GitHub.OpenApiClient&version=4.0.236
Soenneker.GitHub.OpenApiClient
A Kiota-generated .NET client for GitHub's REST API.
Installation
dotnet add package Soenneker.GitHub.OpenApiClient
Create a client
using Microsoft.Kiota.Abstractions.Authentication;
using Microsoft.Kiota.Http.HttpClientLibrary;
using Soenneker.GitHub.OpenApiClient;
var httpClient = new HttpClient
{
BaseAddress = new Uri("https://api.github.com/")
};
httpClient.DefaultRequestHeaders.Authorization =
new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", githubToken);
httpClient.DefaultRequestHeaders.Add("Accept", "application/vnd.github+json");
httpClient.DefaultRequestHeaders.Add("X-GitHub-Api-Version", "2022-11-28");
httpClient.DefaultRequestHeaders.Add("User-Agent", "your-application-name");
var adapter = new HttpClientRequestAdapter(
new AnonymousAuthenticationProvider(),
httpClient: httpClient);
var client = new GitHubOpenApiClient(adapter);
The dedicated HTTP client supplies authentication and GitHub's required headers, so the Kiota adapter uses AnonymousAuthenticationProvider and does not add a second authorization value.
Make a request
var currentUser = await client.User.GetAsync(
cancellationToken: cancellationToken);
var repository = await client.Repos["example-org"]["example-repository"]
.GetAsync(cancellationToken: cancellationToken);
Request builders mirror GitHub's resource hierarchy. Path parameters are usually indexers, and endpoint methods accept request bodies, request-configuration callbacks, and cancellation tokens as described by the generated signatures.
The source is generated and its public models follow GitHub's OpenAPI description. Keep custom behavior and policy outside this package so regeneration does not overwrite it. Soenneker.GitHub.ClientUtil provides authenticated transport and cached construction for application services.
| 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
- Microsoft.Kiota.Http.HttpClientLibrary (>= 2.1.1)
- Microsoft.Kiota.Serialization.Form (>= 2.1.1)
- Microsoft.Kiota.Serialization.Json (>= 2.1.1)
- Microsoft.Kiota.Serialization.Multipart (>= 2.1.1)
- Microsoft.Kiota.Serialization.Text (>= 2.1.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Soenneker.GitHub.OpenApiClient:
| Package | Downloads |
|---|---|
|
Soenneker.GitHub.ClientUtil
Provides lazy, cached access to the generated GitHub REST API client. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.236 | 210 | 9/4/2026 |
| 4.0.235 | 128 | 9/4/2026 |
| 4.0.234 | 7,740 | 9/3/2026 |
| 4.0.233 | 954 | 9/3/2026 |
| 4.0.232 | 196 | 9/3/2026 |
| 4.0.230 | 148 | 9/2/2026 |
| 4.0.229 | 58 | 9/2/2026 |
| 4.0.228 | 62 | 9/2/2026 |
| 4.0.227 | 6,331 | 8/31/2026 |
| 4.0.226 | 1,695 | 8/30/2026 |
| 4.0.225 | 10,600 | 8/29/2026 |
| 4.0.224 | 4,586 | 8/28/2026 |
| 4.0.223 | 1,451 | 8/26/2026 |
| 4.0.222 | 2,485 | 8/25/2026 |
| 4.0.221 | 5,074 | 8/21/2026 |
| 4.0.220 | 6,472 | 8/18/2026 |
| 4.0.219 | 4,189 | 8/16/2026 |
| 4.0.218 | 1,086 | 8/15/2026 |
| 4.0.217 | 330 | 8/15/2026 |
| 4.0.216 | 1,119 | 8/14/2026 |
Automated update