Note that when you getUser()
you will get a user that represents the authenticated user. This will slightly change the calls to GitHub. In general you should have to worry about the differences between Listing your repos and listing a user’s repos because things should just work.
import GitHub from 'github-api';
// basic auth
const gh = new GitHub({
username: 'FOO',
password: 'NotFoo'
});
const me = gh.getUser();
me.listNotification(function(err, notifcations) {
// do some stuff
});
const clayreimann = gh.getUser('clayreimann');
clayreimann.listStarredRepos()
.then(function({data: reposJson}) {
console.log(`clayreimann has ${reposJson.length} repos!`);
});
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4