githubtopcontributors_module

0.1.0 • Public • Published

githubtopcontributors_module


Module that queries the GitHub API and retrieves the "top 10" contributors in JSON format.

Installation

This project is available as a NPM package.

To install with NPM, run the command:

$ npm install githubtopcontributors_module

Usage

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.

Running Tests

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

License

Licensed under MIT.

Package Sidebar

Install

npm i githubtopcontributors_module

Weekly Downloads

2

Version

0.1.0

License

MIT

Last publish

Collaborators

  • stanleyta