github
github copied to clipboard
initialize user with access token
import GitHub from 'github-api';
// basic auth
const gh = new GitHub({
username: 'FOO',
password: 'NotFoo'
});
how to initialize the user with an access token instead?
// token auth
const gh = new GitHub({
username: 'FOO',
token: 'YourToken'
});