Пример #1
0
        public async void GetFileTest()
        {
            var http = new HttpClient()
            {
                BaseAddress = new Uri("https://api.github.com")
            };

            http.DefaultRequestHeaders.Add("Authorization", $"Bearer {Environment.GetEnvironmentVariable("INT_GITHUB_KEY")}");
            http.DefaultRequestHeaders.Add("User-Agent", "ExileLab");

            var api = new GitHubApi(http);

            var res = await api.GetFile(new GitQuery("xeonexile/gitconfig", "config/appsettings.json"));

            return;
        }