github-api-client

1.0.3 • Public • Published

Github-client

Client for Github API v3.

Installation

npm i github-api-client --save

How to use

import GithubApiClient from 'github-api-client';

const ghClient = new GithubApiClient();

Methods

user( user )

Get user info by user.

ghClient.user('tunadao1')
	.then(res => {
		//your code using response
	});

repos( options )

Get repositories info by username.

const options = {
	username: 'tunadao1',
	page: 1, //Optional
	limit: 50 //Optional
};
    
ghClient.repos( options )
	.then(res => {
		//your code using response
	});

issues( options )

Get issues info by user and repository.

const options = {
	username: 'tunadao1',
	repository: 'github-client'
};

ghClient.issues( options )
	.then(res => {
		//your code using response
	});

Package Sidebar

Install

npm i github-api-client

Weekly Downloads

3

Version

1.0.3

License

MIT

Unpacked Size

56.1 kB

Total Files

8

Last publish

Collaborators

  • tunadao1