Permalink
Browse files

Added some DocBlocks to JavaScript libraries, and cache-busting versi…

…on number
  • Loading branch information...
Japh committed Sep 17, 2012
1 parent 9a6d42d commit 9dc684335e1daa6d900ce33d0d0df4cfcc028ee9
Showing with 31 additions and 2 deletions.
  1. +1 −2 index.html
  2. +6 −0 js/envatowp.github.js
  3. +24 −0 js/github.api.js
View
@@ -98,9 +98,8 @@ <h2>Latest EnvatoWP activity via GitHub</h2>
</div><!-- #footer-wrap -->
<script type="text/javascript" src="/widget/widget.js"></script>
- <script type="text/javascript" src="/js/envatowp.github.js"></script>
+ <script type="text/javascript" src="/js/envatowp.github.js?ver=1.0"></script>
</body>
</html>
-
View
@@ -1,3 +1,9 @@
+/**
+ * Functions to retrieve and display GitHub information on the EnvatoWP GitHub page.
+ *
+ * @author Japh <japh@envato.com>
+ * @version 1.0
+ */
$(function() {
$body = $('body');
View
@@ -1,19 +1,43 @@
+/**
+ * Simple jQuery API wrapper for GitHub
+ *
+ * @author Japh <japh@envato.com>
+ * @version 1.0
+ */
function GitHubAPI(){}
+/**
+ * Call to user repo list end-point of GitHub API
+ *
+ * @author Japh <japh@envato.com>
+ * @since 1.0
+ */
GitHubAPI.Repos = function ( username, callback ) {
requestURL = 'https://api.github.com/users/' + username + '/repos?callback=?';
$.getJSON( requestURL, function( json, status ) {
callback( json.data, status );
} );
}
+/**
+ * Call to user watch list end-point of GitHub API
+ *
+ * @author Japh <japh@envato.com>
+ * @since 1.0
+ */
GitHubAPI.Watched = function ( username, callback ) {
requestURL = 'https://api.github.com/users/' + username + '/watched?callback=?';
$.getJSON( requestURL, function( json, status ) {
callback( json.data, status );
} );
}
+/**
+ * Call to user activity stream end-point of GitHub API
+ *
+ * @author Japh <japh@envato.com>
+ * @since 1.0
+ */
GitHubAPI.Activity = function ( username, callback ) {
requestURL = 'https://api.github.com/users/' + username + '/events/public?callback=?';
$.getJSON( requestURL, function( json, status ) {

0 comments on commit 9dc6843

Please sign in to comment.