Skip to content

Instantly share code, notes, and snippets.

Last active March 15, 2023 19:55
What would you like to do?
using GitHubClient.ApiClient;
using Microsoft.Kiota.Abstractions.Authentication;
using Microsoft.Kiota.Http.HttpClientLibrary;
var authProvider = new AnonymousAuthenticationProvider();
var requestAdapter = new HttpClientRequestAdapter(authProvider);
var client = new GitHubApiClient(requestAdapter);
// Use the request builder pattern to get date from the API
var projects = await client.Orgs["microsoft"].Projects.GetAsync();
if(projects != null) {
foreach(var project in projects) {
Console.WriteLine($"Project {project?.Name} is available at {project?.HtmlUrl}");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment