JSPM

githubtopcontributors_module

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 13
  • Score
    100M100P100Q25225F
  • License MIT

node.js module to query the GitHub API and return the "top 10" contributors in json format

Package Exports

  • githubtopcontributors_module

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (githubtopcontributors_module) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.