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

github-api-promise

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github-api-promise

A node module for interfacing with the Github API using promises

  • 1.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
45
increased by32.35%
Maintainers
1
Weekly downloads
 
Created
Source

github-api-promise

A node module for interfacing with the Github API using promises. The full GitHub API documentation can be found at https://developer.github.com/v3/.

Installation

npm install github-api-promise

Usage

TLDR;

  1. Require github-api-promise
  2. Set settings
  3. Make API calls

Basic example code:

var api = require('github-api-promise');

// Set settings
api.config.owner = 'OwnersGithubUsername';
api.config.repo = 'RepoName';
api.config.token = 'YourAccessToken';
api.config.debug = true; // Default is false. Logs request information via console.log when true.

// Do stuff
api.repos.releases.getRepositoryReleases()
	.then(function(res) {
		// Do your stuff here. res is the JSON object returned by the API
	})
	.catch(function(err) {
		console.log('Request failed: ' + err);
	});

For help creating an access token, see the GitHub help article Creating an Access Token for Command Line Use. This package only requires either the repo scope for private repos or the public_repo scope for public repos.

API Support

The following APIs are supported. PRs welcome!

Documentation

TODO: JSDoc on github pages. For now, browse the module's source and read the JSDoc comments.

Thanks

Special thanks to jeejkang for the Stormtroopocat image!

Thanks to aktau/github-release (a library for GO) for the inspiration for this project.

FAQs

Package last updated on 16 Oct 2017

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