Created
May 30, 2012 16:33
-
-
Save kulte/2837475 to your computer and use it in GitHub Desktop.
gitgoggles.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var GitGoggles = { | |
getRepos: function(callback) { | |
this._get('repositories', callback); | |
}, | |
getRepo: function(repo, callback) { | |
this._get('repository/' + repo, callback); | |
}, | |
getCommits: function(repo, callback) { | |
this._get('repository/' + repo + '/commits', callback); | |
}, | |
getCommit: function(repo, sha, callback) { | |
this._get('repository/' + repo + '/commit/' + sha, callback); | |
}, | |
getTags: function(repo, callback) { | |
this._get('repository/' + repo + '/tags', callback); | |
}, | |
getTag: function(repo, tag, callback) { | |
this._get('repository/' + repo + '/tag/' + tag, callback); | |
}, | |
getBranches: function(repo, callback) { | |
this._get('repository/' + repo + '/branches', callback); | |
}, | |
getBranch: function(repo, branch, callback) { | |
this._get('repository/' + repo + '/branch/' + branch, callback); | |
}, | |
_root: 'http://localhost:9292', | |
_get: function(path, callback) { | |
$.getJSON(this._root + path + '?callback=?', callback); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment