Example #1
0
        public GithubApiGraphQl(string personalToken, HttpClient httpClient, GithubUpdateClient githubClient)
            : base(githubClient, httpClient, "https://api.github.com/graphql")
        {
            //Personal token needs to be base64
            var basicValue = Convert.ToBase64String(Encoding.UTF8.GetBytes(personalToken));

            HttpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", basicValue);
        }
Example #2
0
 public GithubApiRest(GithubUpdateClient githubClient, HttpClient httpClient)
     : base(githubClient, httpClient, "https://api.github.com")
 {
 }