Skip to content

Instantly share code, notes, and snippets.

@justinbmeyer justinbmeyer/foo.md
Last active Mar 19, 2019

Embed
What would you like to do?
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
You can’t perform that action at this time.