Skip to content

Instantly share code, notes, and snippets.

@justinbmeyer
Last active March 19, 2019 21:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinbmeyer/ec630a9ba40159cc2ccb38a36c5b7fb9 to your computer and use it in GitHub Desktop.
Save justinbmeyer/ec630a9ba40159cc2ccb38a36c5b7fb9 to your computer and use it in GitHub Desktop.
show More Info

Retrieve an Todo.List from the server.

Todo.getList({filter: {complete: true}})

Retrieve a single todo from the server.

Todo.get({id: 5})

Create a todo by POSTing its data to the server.

var todo = new Todo({name: "learn CanJS"})
todo.save()

Update a todo by PUTing its data to the server.

todo.complete = true;
todo.save();

Destroy a todo by DELETing its data on the server.

todo.destroy();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment