saromanov / github-repositories

Get all GitHub repos from a user

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

github-repositories Build Status

Get all GitHub repos from a user

Install

$ npm install --save github-repositories

Usage

var githubRepos = require('github-repositories');

githubRepos('kevva', function (err, data) {
	console.log(data);
	//=> [{id: 29258368, name: 'animal-sounds', full_name: 'kevva/animal-sounds', ...}, ...]
});

API

githubRepos(user, [options], callback)

user

Required
Type: string

Username to fetch repos from.

options.token

Type: string

Token to authenticate with. Use this to increase the request count. Github supports up to 60 unauthenticated request per hour. This is also required for accessing private repos.

If you don't have a token you can generate a new one here.

callback(err, data)

Type: function

data

Type: array

Contains an array with all Github repos.

CLI

$ npm install --global github-repositories
$ github-repositories --help

  Usage
    $ github-repositories kevva
    $ github-repositories kevva --token 523ef69119eadg12

  Options
    -t, --token    GitHub authentication token

License

MIT © Kevin Mårtensson

About

Get all GitHub repos from a user

License:MIT License


Languages

Language:JavaScript 100.0%