New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

github-paging

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github-paging

A node module for interfacing with paging via the GitHub API

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

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

Keywords

github

FAQs

Package last updated on 05 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts