You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

github-collect

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github-collect

A NodeJS library for getting Github objects like repositories, members, gists for users and orgs.

0.0.1
latest
Source
npmnpm
Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

Github Collect

A NodeJS library for getting Github objects like repositories, members, gists for users and orgs.

Install

npm install github-collect

Configuration

Configuration is handled by rc so any of those valid ways of definingconfiguration will work.

  • github_token: Your Oauth token for Github; you can create one on your Github account under Settings -> Applications. Example of using an environment variable: export github_collect_github_token=abc

Use

var gc = require('github-collect');

// Get returns a promise
gc.get('username').done(function(data) {
  console.log(data);
});

// Username can be an array or a string of names separated by columns
gc.get('username1,username2');
gc.get(['username1', 'username2']);

Provides promises with q.

Data structure

What you will get back in return is a keyed object by username of the Github information for that username with a custom property called objects which holds the supplementary objects.

{
  organization_name: {
    ...,
    objects: {
      repos: [],
      gists: [],
      members: []
    }
  },
  user_name: {
    ...,
    objects: {
      repos: [],
      gists: []
    }
  }
}

Test

npm install -g mocha
mocha

FAQs

Package last updated on 01 Sep 2013

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