public GitHubGraphQLClient(IOptions <GitHubOptions> config)
 {
     _config     = config?.Value ?? throw new ArgumentNullException(nameof(config));
     _connection = new GraphQLConnection(new GraphQLProductHeaderValue(ProductID, ProductVersion), _config.ApiToken);
     _client     = new GitHubClient(new Connection(new ProductHeaderValue(ProductID, ProductVersion))
     {
         Credentials = new Credentials(_config.ApiToken)
     });
 }
Beispiel #2
0
 public ModelService(
     IApiClient apiClient,
     Octokit.GraphQL.IConnection graphql,
     IBlobCache hostCache,
     IAvatarProvider avatarProvider)
 {
     this.ApiClient      = apiClient;
     this.graphql        = graphql;
     this.hostCache      = hostCache;
     this.avatarProvider = avatarProvider;
 }