Module that queries the GitHub API and retrieves the "top 10" contributors in JSON format.
This project is available as a NPM package.
To install with NPM, run the command:
$ npm install githubtopcontributors_module
In your project, include the module:
var mod = require('githubtopcontributors_module');
Call the get()
function passing in the parameters repository_url
, oauth_token
, and github_username
. Note the function returns a Promise, so format it like so:
mod.get(repository_url, oauth_token, github_username)
.then(function (value) {
//do stuff here
});
And voila. To see it in action, a full site integrated with GitHub authentication is available for download at: GitHub. Download and unpack the source to a local directory, download dependencies using npm install
, and run the server with npm start
. Fire up your web browser, and navigate to localhost:3001.
Install mocha
globally.
npm install -g mocha
Navigate to the project folder and run npm install
to install the
project's dependencies.
Then simply run the tests.
mocha
or
npm test
Licensed under MIT.