This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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