1.0.3 • Published 6 years ago
github-api-client v1.0.3
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
});