Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…on number
  • Loading branch information...
commit 9dc684335e1daa6d900ce33d0d0df4cfcc028ee9 1 parent 9a6d42d
@Japh Japh authored
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
3  index.html
@@ -98,9 +98,8 @@
</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
6 js/envatowp.github.js
@@ -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
24 js/github.api.js
@@ -1,5 +1,17 @@
+/**
+ * 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 ) {
@@ -7,6 +19,12 @@ GitHubAPI.Repos = function ( username, callback ) {
} );
}
+/**
+ * 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 ) {
@@ -14,6 +32,12 @@ GitHubAPI.Watched = function ( username, callback ) {
} );
}
+/**
+ * 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 ) {
Please sign in to comment.
Something went wrong with that request. Please try again.