Monster.Data.Datasource.Server. RestAPI

Namespace for storages

Author
  • schukai GmbH

Classes

DataFetchError

the error is thrown by the rest api in case of error

WriteError

the error is thrown by the rest api in case of error

Members

defaults

Properties
NameTypeDefaultDescription
writeObject{}

Options

Properties
NameTypeDefaultDescription
initObject{}

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

Properties
NameTypeDefaultDescription
methodstringPOST
headersObject

Object containing any custom headers that you want to apply to the request.

responseCallbackstring

Callback function to be executed after the request has been completed.

acceptedStatusstring[200,201
urlstring

URL

mappingObject

the mapping is applied before writing.

Properties
NameTypeDescription
transformerString

Transformer to select the appropriate entries

callbackArray.<Monster.Data.Datasource~exampleCallback>

with the help of the callback, the structures can be adjusted before writing.

reportObject
Properties
NameTypeDescription
pathString

Path to validations

sheathingObject
Properties
NameTypeDescription
objectObject

Object to be wrapped

pathstring

Path to the data

readObject{}

Options

Properties
NameTypeDefaultDescription
initObject{}

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

Properties
NameTypeDefaultDescription
methodstringGET
acceptedStatusstring[200
urlstring

URL

mappingObject

the mapping is applied after reading.

Properties
NameTypeDescription
transformerString

Transformer to select the appropriate entries

callbackArray.<Monster.Data.Datasource~exampleCallback>

with the help of the callback, the structures can be adjusted after reading.

(static) instanceSymbol

This method is called by the instanceof operator.

This method is called by the instanceof operator.

Since
  • 2.1.0

Methods

getClone() → {RestAPI}

Returns:
Type: 
RestAPI

read() → {Promise}

Throws:
  • the options does not contain a valid json definition

    Type
    Error
  • value is not a object

    Type
    TypeError
  • the data cannot be read

    Type
    Error
Returns:
Type: 
Promise

write() → {Promise}

Throws:

the data cannot be written

Type
WriteError
Returns:
Type: 
Promise