Skip to content

Commit

Permalink
Add store API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ebryn committed Mar 27, 2015
1 parent 381abe2 commit f8254a4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,16 @@ existingUser.get('isDirty'); // => true
existingUser.save(); // PUT /users/1
```

## Store API

`Store#find(<type>)` - find all records by type, returns a promise

`Store#find(<type>, <id>)` - find by primary key (multiple calls within a single run loop can coalesce to a findMany), returns a promise

`Store#find(<type>, <object>)` - find query - object gets passed directly to your adapter, returns a promise

`Store#createRecord(<type>, <object>)` - create a new record

## Model API

`Model.create` - create a new record
Expand Down

0 comments on commit f8254a4

Please sign in to comment.