class GitHubClient
extends WebApiClient
Abstract
import { GitHubClient } from "https://deno.land/x/kd_clients@v1.0.0-preview.12/core/GitHubClient.ts";
Provides a base class for HTTP clients.
Properties
private
headerParser: LinkHeaderParserMethods
private
createAlternatePagesGroups(totalPages: number): [number[], number[]]Creates 2 groups of pages from the given totalPages.
private
isKnownGitHubError(error: unknown): error is Returns a value indicating whether the given error is a valid GitHub error.
protected
containsToken(): booleanReturns a value indicating whether or not a token was provided.
protected
getAllData<T>(): Promise<T[]>Gets all data starting at the given page with a quantity for each page using the given qtyPerPage.
protected
getAllDataUntil<T>(): Promise<T[]>Gets all data starting at the given page with a quantity for each page using the given qtyPerPage, until the given getData predicate returns true.
protected
getAllFilteredData<T>(): Promise<T[]>Gets all data starting at the given page with a quantity for each using the given qtyPerPage, with each page of data being filtered with the given getData function.