Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function() {
- var jQuery = window.$;
- var OpenRegister = function(endpoint) {
- this.endpoint = endpoint;
- };
- OpenRegister.prototype.buildURL = function(path) {
- return this.endpoint + path + ".json";
- };
- OpenRegister.prototype.hash = function(id) {
- var path = this.buildURL("hash/" + id);
- return jQuery.getJSON(path).done(function (data) {
- return data;
- });
- };
- OpenRegister.prototype.all = function () {
- return jQuery.getJSON(this.buildURL("all")).done(function (data) {
- return data;
- });
- };
- window.OpenRegister = OpenRegister;
- }).call(this);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement