Soenneker.GitHub.OpenApiClient 4.0.236

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.GitHub.OpenApiClient --version 4.0.236
                    
NuGet\Install-Package Soenneker.GitHub.OpenApiClient -Version 4.0.236
                    
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.GitHub.OpenApiClient" Version="4.0.236" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.GitHub.OpenApiClient" Version="4.0.236" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.GitHub.OpenApiClient" />
                    
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.GitHub.OpenApiClient --version 4.0.236
                    
#r "nuget: Soenneker.GitHub.OpenApiClient, 4.0.236"
                    
#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.GitHub.OpenApiClient@4.0.236
                    
#: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.GitHub.OpenApiClient&version=4.0.236
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.GitHub.OpenApiClient&version=4.0.236
                    
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.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 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 (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.248 7 9/17/2026
4.0.247 797 9/16/2026
4.0.246 1,640 9/15/2026
4.0.245 103 9/15/2026
4.0.244 10,106 9/12/2026
4.0.243 2,872 9/12/2026
4.0.242 1,871 9/11/2026
4.0.241 2,849 9/10/2026
4.0.240 6,358 9/8/2026
4.0.239 368 9/8/2026
4.0.238 97 9/8/2026
4.0.237 92 9/8/2026
4.0.236 13,834 9/4/2026
4.0.235 298 9/4/2026
4.0.234 12,407 9/3/2026
4.0.233 1,157 9/3/2026
4.0.232 325 9/3/2026
4.0.230 226 9/2/2026
4.0.229 103 9/2/2026
4.0.228 101 9/2/2026
Loading failed

Automated update