You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 18, 2020. It is now read-only.
* added new concept of request params
* fill in empty object as default for requestParams
* add integration spec for request params
* updated readme
* added specs for derive request id
* 6.1.0-0
| schema |`true`| A [normalizr](https://github.com/paularmstrong/normalizr) schema that is used to store and access your data. |
50
-
| collection |`true`| Identifier where all retrieved instances for that type will be stored. |
51
-
| fetch(query, body) |`false`| A method that takes a custom set of properties and maps it to a call of [`callAPI`](https://github.com/signavio/generic-api/blob/master/src/callApi.js) to retrieve data from your backend. |
52
-
| create(query, body) |`false`| Function that describes how an instance is created. |
53
-
| update(query, body) |`false`| Function that describes how an instance is updaetd. |
54
-
| remove(query, body) |`false`| Function that describes how an instance is removed. |
55
-
| cachePolicy |`false`| The cache policy that should be used for that type. See [cache policies](TODO) for the possible options. |
| schema |`true`| A [normalizr](https://github.com/paularmstrong/normalizr) schema that is used to store and access your data. |
50
+
| collection |`true`| Identifier where all retrieved instances for that type will be stored. |
51
+
| fetch(query, body, requestParams) |`false`| A method that takes a custom set of properties and maps it to a call of [`callAPI`](https://github.com/signavio/generic-api/blob/master/src/callApi.js) to retrieve data from your backend. |
52
+
| create(query, body, requestParams) |`false`| Function that describes how an instance is created. |
53
+
| update(query, body, requestParams) |`false`| Function that describes how an instance is updaetd. |
54
+
| remove(query, body, requestParams) |`false`| Function that describes how an instance is removed. |
55
+
| cachePolicy |`false`| The cache policy that should be used for that type. See [cache policies](TODO) for the possible options. |
56
56
57
57
### `callApi(fullUrl, schema[, options])`
58
58
@@ -234,14 +234,15 @@ and created a new prop `userFetch` that represents the API request. You include
234
234
certain configuration options to get more power over when and how requests go
| type |`undefined`|`true`| The API type which is concered. |
240
-
| query |`undefined`|`false`| An object of query parameters. |
241
-
| id |`undefined`|`false`| Shortcut to provide an ID query parameter, `id: 1` is equivalent to `query: { id: 1 }`|
242
-
| method |`fetch`|`false`| Either one of `fetch`, `create`, `update`, or `remove`. |
243
-
| lazy |`false`|`false`| Only useful in combination with `method: 'fetch'`. Per default, the resource is fetched on component mount. Set `lazy: true` to not fetch on mount. |
244
-
| denormalize |`false`|`false`| Inline all referenced data into the injected prop. |
| type |`undefined`|`true`| The API type which is concered. |
240
+
| query |`undefined`|`false`| An object of query parameters. |
241
+
| requestParams |`undefined`|`false`| An object of extra parameters to tell different requests apart. |
242
+
| id |`undefined`|`false`| Shortcut to provide an ID query parameter, `id: 1` is equivalent to `query: { id: 1 }`|
243
+
| method |`fetch`|`false`| Either one of `fetch`, `create`, `update`, or `remove`. |
244
+
| lazy |`false`|`false`| Only useful in combination with `method: 'fetch'`. Per default, the resource is fetched on component mount. Set `lazy: true` to not fetch on mount. |
245
+
| denormalize |`false`|`false`| Inline all referenced data into the injected prop. |
0 commit comments