GitHubClient constructor

GitHubClient({
  1. required CacheManager cacheManager,
  2. HttpClientWrapper? httpClient,
})

Creates a new GitHub API client.

An optional httpClient can be provided for testing; otherwise a default HttpClientWrapper is created automatically.

Implementation

GitHubClient({
  required CacheManager cacheManager,
  HttpClientWrapper? httpClient,
})  : _cache = cacheManager,
      _http = httpClient ?? HttpClientWrapper();