Skip to content

GitHub API Node library featuring streamed items of paged responses and awaited rate limit resets

License

Notifications You must be signed in to change notification settings

TomasHubelbauer/github-api

Repository files navigation

GitHub API

An implementation of a GitHub API which handles rate limit hits by waiting for the rate limit reset and streams collection results across pages using as async interator.

Useful for long-running scripts.

Instalation

npm install TomasHubelbauer/github-api

Usage

const github = require('github-api');
// `token` can be left `undefined` to use the API with public access rate limits
for await (const repository of github.getUsersUserRepos('TomasHubelbauer', { token })) {
  // …
}

Documentation

See index.d.ts (auto-generated).

Testing

node test