Request.LatestGitHub v2.0

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.



Details

Author
Adrian Statescu
Current version
v2.0
GitHub
thinkphp/Request.LatestGitHub
Downloads
6628
Category
Widgets
Tags
Report
GitHub Issues

Releases


Dependencies

  • core: 1.3/Element/core: 1.3
  • _self_/_current_: /Log
  • core/1.3: *

How to use

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

    #HTML
    <script type="text/javascript" src="mootools-core.js"></script>
    <script type="text/javascript" src="JSONP.js"></script>
    <script type="text/javascript" src="Request.LatestGitHub.js"></script>

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
   <div id="gh"></div>
   <div id="gh2"></div>

Notes:

You can view in action:


Discuss

A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.

Found a bug in this plugin? Please report it this repository's Github Issues.

blog comments powered by Disqus