Change object user to object model

This commit is contained in:
ridermansb
2015-09-23 07:51:23 -03:00
parent bd7be4ea62
commit c2c6dfa673
2 changed files with 10 additions and 12 deletions
+4 -4
View File
@@ -2,8 +2,8 @@
var userFn = Stamplay.User();
var user = new userFn.Model;
var colTags = new Stamplay.Cobject('tag');
var tags = colTags.Collection;
var colTags = Stamplay.Cobject('tag');
var tags = new colTags.Collection();
// Signing up
var registrationData = {
@@ -21,8 +21,8 @@ user.signup(registrationData).then(function(){
// Action
var colFoo = new Stamplay.Cobject('foo');
var fooMod = colFoo.Model;
var colFoo = Stamplay.Cobject('foo');
var fooMod = new colFoo.Model();
fooMod.fetch(5).then(
function(){
return fooMod.upVote()
+6 -8
View File
@@ -16,20 +16,18 @@ declare module Stamplay {
fetch(id : any) : PromisesAPlus.Thenable<any>
destroy() : PromisesAPlus.Thenable<any>
save({}?) : PromisesAPlus.Thenable<any>
upVote() : PromisesAPlus.Thenable<any>
}
export interface IStamplayAction {
new() : IStamplayModel
upVote() : PromisesAPlus.Thenable<any>
}
export interface IStamplayUser {
export interface IStamplayObject {
Model : IStamplayModel
Collection : any
}
export interface StamplayStatic {
User() : IStamplayUser
Cobject(collection : string) : void
User() : IStamplayObject
Cobject(object : string) : IStamplayObject
}
}