-
Notifications
You must be signed in to change notification settings - Fork 18
Home
Github.js is a JavaScript plugin over GitHub APIs v3. It gives an easy way to feature your GitHub open-source contributions on your website or portfolio.
It provides widgets with simple UI featuring profile details and stream of public activities. Three types of useful widgets:
Click here for live demo.
#Dependency
The plugin has hard dependency on underscore.js(~v1.6.0). You can download it from here.
Add github.js and github.css to your project. Download.
<link rel='stylesheet' href='github.css'/>
// Add underscore.js
<script type="text/javascript" src="underscore-min.js"></script>
<script type="text/javascript" src='github.js'></script>
Github.js is available via bower and npm.
$ bower install --save githubjs
$ npm install --save githubjs
GitHub APIs have rate limit on the number of requests a user can make. An Authenticated user can make upto 5,000 requests per hour. But, unauthenticated user can only make 60 requests per hour. Unauthenticated requests are associated with your IP address. Therefore, authenticated requests are always preferred. All the widgets support OAuth authorization protocol of GitHub.
You can pass this token with other parameters like:
Github.userProfile({
username: "jashkenas",
OAuth: 'OAUTH-TOKEN',
selector: ".user-1"
});
You can create your personal access token here.