github-api-wrapper

2.4.2 • Public • Published

Github API Wrapper

A wrapper to work with the Github Web API.

Browser Support

This library relies on Fetch API. And this API is supported in the following browsers.

Chrome Firefox Opera Safari IE
39+ ✔ 42+ ✔ 29+ ✔ 10.1+ ✔ Nope ✘

Dependencies

This library depends on fetch to make requests to the Spotify Web API. For environments that don't support fetch, you'll need to provide a polyfill to browser or polyfill to Node.

Installation

$ npm install github-api-wrapper --save

How to use

ES6

// to import a specific method
import GithubApiWrapper from 'github-api-wrapper';

const github = new GithubApiWrapper({});
Will setup 'mundipagg' as default

or use as you want:

const github = new GithubApiWrapper({
  userName: 'paulajbastos'
});

// using  method
github.repositories.getRepoList();
github.commits.getCommitsList('repoName');
github.contributors.getContributorsList('repoName');

CommonJS

const githubApiWrapper = require('github-api-wrapper');

UMD in Browser

<!-- to import non-minified version -->
<script src="github-api-wrapper.umd.js"></script>

<!-- to import minified version -->
<script src="github-api-wrapper.umd.min.js"></script>

After that the library will be available to the Global as githubApiWrapper. Follow an example:

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

[Paula Junqueira Bastos]
Paula Junqueira Bastos

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

/github-api-wrapper/

    Package Sidebar

    Install

    npm i github-api-wrapper

    Weekly Downloads

    10

    Version

    2.4.2

    License

    MIT

    Last publish

    Collaborators

    • paulajbastos