0.0.11 • Published 8 years ago
github-fetcher v0.0.11
github-fetcher
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
License
MIT © Hemanth.HM