Classes
- WriteError
the error is thrown by the rest api in case of error
Members
(static) instanceSymbol
This method is called by the instanceof
operator.
This method is called by the instanceof
operator.
defaults
PropertiesName | Type | Default | Description |
---|
write | Object | {} | Options PropertiesName | Type | Default | Description |
---|
init | Object | {} | An options object containing any custom settings that you want to apply to the request. The parameters are identical to those of the Request constructor PropertiesName | Type | Default | Description |
---|
method | string | POST | | headers | Object | | Object containing any custom headers that you want to apply to the request. |
| acceptedStatus | string | [200,201 | | url | string | | URL | mapping | Object | | the mapping is applied before writing. PropertiesName | Type | Description |
---|
transformer | String | Transformer to select the appropriate entries | callback | Array.<Monster.Data.Datasource~exampleCallback> | with the help of the callback, the structures can be adjusted before writing. |
| report | Object | | PropertiesName | Type | Description |
---|
path | String | Path to validations |
| sheathing | Object | | PropertiesName | Type | Description |
---|
object | Object | Object to be wrapped | path | string | Path to the data |
|
|
read | Object | {} | Options PropertiesName | Type | Default | Description |
---|
init | Object | {} | An options object containing any custom settings that you want to apply to the request. The parameters are identical to those of the Request constructor PropertiesName | Type | Default | Description |
---|
method | string | GET | |
| acceptedStatus | string | [200 | | url | string | | URL | mapping | Object | | the mapping is applied after reading. PropertiesName | Type | Description |
---|
transformer | String | Transformer to select the appropriate entries | callback | Array.<Monster.Data.Datasource~exampleCallback> | with the help of the callback, the structures can be adjusted after reading. |
|
|
Methods
getClone() → {RestAPI}
read() → {Promise}
Throws:the options does not contain a valid json definition
- Type
- Error
- Type
- TypeError
- Type
- Error
write() → {Promise}
Throws:the data cannot be written
- Type
- WriteError