Skip to content

Instantly share code, notes, and snippets.

@mseeks
Created February 12, 2013 00:04
Show Gist options
  • Save mseeks/4758804 to your computer and use it in GitHub Desktop.
Save mseeks/4758804 to your computer and use it in GitHub Desktop.
define(['jquery', 'store'], function($, Store){
var Issue = {
all: function(callback) {
$.getJSON('issues.json', function(issues) {
callback(issues);
});
},
get: function(id, callback) {
$.getJSON('issues/' + id + '.json', function(issue) {
callback(issue);
});
}
};
return {
Issue: Issue
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment