The client is a low level wrapper around API calls to the Quintype API. The client object is usually created for you by the malibu framework. The majority of functions on Client are not documented as they are not meant for external use. Instead, please use the higher level APIs on Story, Collection or other entity.

If needed, a client can be created with the buildClient method.


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

View Source index.js, line 974

A Promise that returns a in-memory cached instance of Config


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.

View Source index.js, line 958

A Promise that returns an instance of Config


getHostname() → {string}

Get the hostname this client is currently pointed to. Usually,

View Source index.js, line 808



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.

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)

View Source index.js, line 826

A promise of the response