(require("services/dynamic/json-path"))(superclass) → {function}
Dynamic service class factory which wraps module:core/base-service/base~BaseService with support of JSONPath.
Parameters:
Name | Type | Description |
---|---|---|
superclass |
function | class to extend |
- Source:
Returns:
wrapped class
- Type
- function
Methods
(async) fetch(attrs) → {object}
Request data from an upstream API, transform it to JSON and validate against a schema
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
attrs |
object | Refer to individual attrs Properties
|
- Source:
Returns:
Parsed response
- Type
- object