Skip to content

Commit 0469bf5

Browse files
committed
Update readme to indicate all methods except delete take options
1 parent 3e3dd5f commit 0469bf5

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

README.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -116,20 +116,6 @@ resource
116116
.then(response => console.log(response.data));
117117
```
118118

119-
#### Options
120-
121-
All read methods take an optional `options` property, consisting of an object of additional options to pass. Each key/value pair in the object is translated into a query string parameter key/value pair:
122-
123-
```js
124-
resource.all({
125-
options: {
126-
include: 'comments',
127-
},
128-
});
129-
130-
// requests to widgets?include=comments
131-
```
132-
133119
### Writing
134120

135121
#### create
@@ -170,6 +156,20 @@ Deletes the passed-in record. Only the `id` property is used, so you can pass ei
170156
widgetResource.delete({ id: 42 });
171157
```
172158

159+
### Options
160+
161+
All methods that return records (so, all but `delete()`) take an optional `options` property, consisting of an object of additional options to pass. Each key/value pair in the object is translated into a query string parameter key/value pair:
162+
163+
```js
164+
resource.all({
165+
options: {
166+
include: 'comments',
167+
},
168+
});
169+
170+
// requests to widgets?include=comments
171+
```
172+
173173
## License
174174

175175
Apache-2.0

0 commit comments

Comments
 (0)