Permalink
Browse files

Add example resources

  • Loading branch information...
angelini committed Jan 12, 2012
1 parent c03df8b commit 99f635df4a16892756797b16bdf65971b68256dc
@@ -0,0 +1,15 @@
+var Songs = {
+ Resource: {
+ get: function(sid, callback) {
+ callback(null, {sid: sid});
+ }
+ },
+
+ Collection: {
+ get: function(callback) {
+ callback(null, {all: 'songs'});
+ }
+ }
+};
+
+module.exports = Songs;
@@ -0,0 +1,19 @@
+var Contacts = {
+ Resource: {
+ get: function(uid, cid, callback) {
+ callback(null, {uid: uid, cid: cid});
+ },
+
+ post: function(uid, cid, callback) {
+ callback(null, {body: this.body});
+ }
+ },
+
+ Collection: {
+ get: function(uid, callback) {
+ callback(null, {uid: uid, all: 'contacts'});
+ }
+ }
+};
+
+module.exports = Contacts;
@@ -10,6 +10,6 @@ var Users = {
callback(null, {all: 'users'});
}
}
-}
+};
module.exports = Users;

0 comments on commit 99f635d

Please sign in to comment.