Methods
async getCacheConfig() → {Promise.<Config>}
This method is used to get the current in-memory cached config for this publisher. By default, this has a TTL of 4 minutes. This can be enabled by the toggle ENABLE_TTL_CACHE in cache-constants.js file, can be modified via black-knight
async getConfig() → {Promise.<Config>}
This can be used to get the current config for this publisher this client points to. By default, this reloads every 4 minutes.
You will not typically need to call this method, as @quintype/framework
does this for you.
getHostname() → {string}
Get the hostname this client is currently pointed to. Usually, http://xyz.internal.quintype.io
Hostname
request(path, opts) → {Promise.<Response>}
Low level API for making a request to the backend. This API is not intended to be used by app developers.
Parameters:
Name | Type | Description |
---|---|---|
path |
string | The path of the API, usually starting /api/v1 |
opts |
Object | options that passed directly to request |
method |
string | The HTTP method to be called (default 'GET') |
qs |
Object | An object of query parameters to be passed to the backend |
body |
string | The body of the request (for POST requests only) |
A promise of the response