An open API service indexing awesome lists of open source software.

https://github.com/thinkphp/request.latestgithub

Request.LatestGithub is a Plugin MooTools which allows you to display latest public repos or all the projects from any user GitHub as a widget expanding the class Request / Request.JSONP and using PHP, YQL and JSONP-X / JSONP
https://github.com/thinkphp/request.latestgithub

Last synced: 3 months ago
JSON representation

Request.LatestGithub is a Plugin MooTools which allows you to display latest public repos or all the projects from any user GitHub as a widget expanding the class Request / Request.JSONP and using PHP, YQL and JSONP-X / JSONP

Awesome Lists containing this project

README

          

Request.LatestGitHub
====================

Request.LatestGithub is a Plugin MooTools which allows you to display latest public repos or all the projects from any user GitHub as a widget by expanding the class Request.JSONP from MooTools More.

![Screenshot](http://farm5.static.flickr.com/4151/5103040626_4bc61b102f.jpg)

How to use
----------

First you must to include the JS files in the head of your HTML document.

#HTML


In your JS.

#JS
window.addEvent('domready',function(){
//#example 1
var git = new Request.GitHub({
onSuccess: function(badge) {
document.id('gh').set('html', badge);
},
onRequest: function() {
document.id('gh').set('text', 'Loading...');
}
});
//call latest 3 projects from jquery github
git.load('jquery',3);

//#example 2
//call latest 3 projects from mootools github
document.id('gh2').loadLatestGitHub('mootools',3);
});

In your HTML.

#HTML


### Notes:

You can view in action:

- [http://thinkphp.ro/apps/js-hacks/Request.LatestGitHub/v1.0/](http://thinkphp.ro/apps/js-hacks/Request.LatestGitHub/v1.0/)
- [http://thinkphp.ro/apps/js-hacks/Request.LatestGitHub/v2.0/](http://thinkphp.ro/apps/js-hacks/Request.LatestGitHub/v2.0/)
- [http://thinkphp.ro/apps/js-hacks/Request.LatestGitHub/v2.0/form.html](http://thinkphp.ro/apps/js-hacks/Request.LatestGitHub/v2.0/form.html)