Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gh-api-request

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gh-api-request

Wrapper to Github API v3 to manage a request of queue that deals with rate limitations

  • 0.1.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

gh-api-request is a wrapper around the Github API v3 with the following features:

  • each request is added to a queue of requests that takes care of the API rate limitations
  • whenever the result of a request is paged, it fetches all the pages

Install

npm install gh-api-request

Usage

const ghrequest = require('gh-api-request');

ghrequest.ghToken = 'foobar'; // Set to your Github API token

// Optional
ghrequest.userAgent = 'My User Agent https://example.com'; // defaults to Node Github API Request queue https://github.com/dontcallmedom/gh-api-request/

request('https://api.github.com/user/issues')
       .then(issues =>
          /* all issues of the user, even if paged */
          console.log(JSON.stringify(issues, null, 2)
        );

FAQs

Package last updated on 06 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc