1.0.2 • Published 5 years ago

github-paging v1.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

github-paging

Build Status

A node module for interfacing with paging via the GitHub API

Available at npm

Installation

This Node.js module is available through the npm registry. Install using:

npm i github-paging

Features

  • Interface with the GitHub API seamlessly for paging
  • With a personal access token from GitHub, get public and private users from an organization

Usage

let paging = require('github-paging');
let options = {
    url: 'https://api.github.com',
    headers: {
        'user-agent': 'github-paging',
        'Accept': 'application/vnd.github.mercy-preview+json',
    },
};

paging(options, (err, pages) => {
    if (err) { console.log(err); return; }
    console.log(pages);
});

Rate Limiting

For unauthenticated requests, GitHub's rate limit allows for up to 60 requests per hour. Use an access_token to make up to 5000 requests per hour.

Other Options

let options = {
    url: 'https://api.github.com',
    proxy: null,
    qs: {
        'per_page': '100', // default is 100
        'access_token': '', // personal access token from github
    },
    headers: {
        'user-agent': 'github-paging',
        'Accept': 'application/vnd.github.mercy-preview+json',
    },
};

Tests

To run the test suite, first install the dependencies then run the tests:

npm install

npm test

Contributing

Contributing Guide

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago