@ember-data-types/rest 5.8.0-alpha.3 → 5.8.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,25 +1,7 @@
|
|
|
1
1
|
declare module '@ember-data/rest/request' {
|
|
2
2
|
/**
|
|
3
|
-
* <p align="center">
|
|
4
|
-
<img
|
|
5
|
-
class="project-logo"
|
|
6
|
-
src="https://raw.githubusercontent.com/warp-drive-data/warp-drive/4612c9354e4c54d53327ec2cf21955075ce21294/ember-data-logo-light.svg#gh-light-mode-only"
|
|
7
|
-
alt="EmberData"
|
|
8
|
-
width="240px"
|
|
9
|
-
title="EmberData"
|
|
10
|
-
/>
|
|
11
|
-
</p>
|
|
12
|
-
|
|
13
3
|
This package provides utilities for working with **REST**ful APIs with [*Ember***Data**](https://github.com/warp-drive-data/warp-drive/).
|
|
14
4
|
|
|
15
|
-
## Installation
|
|
16
|
-
|
|
17
|
-
Install using your javascript package manager of choice. For instance with [pnpm](https://pnpm.io/)
|
|
18
|
-
|
|
19
|
-
```sh
|
|
20
|
-
pnpm add @ember-data/json-api
|
|
21
|
-
```
|
|
22
|
-
|
|
23
5
|
## Usage
|
|
24
6
|
|
|
25
7
|
Request builders are functions that produce [Fetch Options](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).
|
|
@@ -43,8 +25,8 @@ declare module '@ember-data/rest/request' {
|
|
|
43
25
|
* /
|
|
44
26
|
```
|
|
45
27
|
|
|
46
|
-
Request builder output is ready to go for use with
|
|
47
|
-
|
|
28
|
+
Request builder output is ready to go for use with {@link Store.request | store.request},
|
|
29
|
+
{@link RequestManager.request | manager.request} and most conventional REST APIs.
|
|
48
30
|
|
|
49
31
|
Resource types are pluralized and camelized for the url.
|
|
50
32
|
|
|
@@ -53,16 +35,7 @@ declare module '@ember-data/rest/request' {
|
|
|
53
35
|
|
|
54
36
|
URLs follow the most common REST format (camelCase pluralized resource types).
|
|
55
37
|
|
|
56
|
-
### Available Builders
|
|
57
|
-
|
|
58
|
-
- [createRecord](https://api.emberjs.com/ember-data/release/functions/@ember-data%2Frest/createRecord)
|
|
59
|
-
- [deleteRecord](https://api.emberjs.com/ember-data/release/functions/@ember-data%2Frest/deleteRecord)
|
|
60
|
-
- [findRecord](https://api.emberjs.com/ember-data/release/functions/@ember-data%2Frest/findRecord)
|
|
61
|
-
- [query](https://api.emberjs.com/ember-data/release/functions/@ember-data%2Frest/query)
|
|
62
|
-
- [updateRecord](https://api.emberjs.com/ember-data/release/functions/@ember-data%2Frest/updateRecord)
|
|
63
|
-
|
|
64
38
|
* @module
|
|
65
|
-
* @public
|
|
66
39
|
*/
|
|
67
40
|
export { findRecord, query, deleteRecord, createRecord, updateRecord } from "@warp-drive/utilities/rest";
|
|
68
41
|
|