github-fetcher

0.0.11 • Public • Published

github-fetcher Build Status

Promised based isomorphic Github API.

Install

$ npm install --save github-fetcher

Usage

var githubFetcher = require('github-fetcher');

API

Fetch user info.

githubFetcher.user('hemanth').
  then( (data) => console.log(data) ).
	catch( (err) => console.log(err) );

Fetch organizations of an user.

githubFetcher.orgs('hemanth').
  then( (data) => console.log(data) ).
	catch( (err) => console.log(err) );

Fetch all the public gists of an user.

githubFetcher.gists('hemanth').
  then( (data) => console.log(data) ).
	catch( (err) => console.log(err) );

Fetch all the repos for a given user.

githubFetcher.repos('hemanth').
  then( (data) => console.log(data) ).
	catch( (err) => console.log(err) );

Fetch all the branches for a given repo and user.

githubFetcher.branches('hemanth','paws-on-es6').
  then( (data) => console.log(data) ).
	catch( (err) => console.log(err) );

Fetch all the stargazers for a given user and repo.

githubFetcher.gists('hemanth','es7-features').
  then( (data) => console.log(data) ).
	catch( (err) => console.log(err) );

Fetch all the emojis available to use on GitHub.

githubFetcher.emojis().
  then( (data) => console.log(data) ).
	catch( (err) => console.log(err) );

Fetch all the gitignore templates or a specific template.

githubFetcher.gitIgnore().
  then( (data) => console.log(data) ).
	catch( (err) => console.log(err) );

/* OR a specific lang */

githubFetcher.gitIgnore('node').
  then( (data) => console.log(data) ).
	catch( (err) => console.log(err) );

Fetch all the members of the given org.

githubFetcher.members('yeoman').
  then( (data) => console.log(data) ).
	catch( (err) => console.log(err) );

Fetches all the licenses or particular type.

githubFetcher.licenses(<type>).
  then( (data) => console.log(data) ).
	catch( (err) => console.log(err) );

TODO

issue#1

License

MIT © Hemanth.HM

Package Sidebar

Install

npm i github-fetcher

Weekly Downloads

1

Version

0.0.11

License

MIT

Last publish

Collaborators

  • hemanth