Module

api-wrapper

Methods

# static getAPIV3Pooling()

Parameters:
Name Type Description
options.uri String

i.g /geored/client/hierarchies?page=1&itemsPerPage=100

options.payload Object

Used for querystring parameters {query:'foo'} will add ?query=foo

options.forcePayload Boolean

Payload will be also used in pagination calls (Intermediate requests)

options.callback function

To be called for each response

View Source api/index.js, line 493

# static populateApiPlatformResponse(res, populateOptions)

Parameters:
Name Type Description
res Object

API Wrapper response {data:[]}

populateOptions Array

i.g ['associatedSensor'] or {items:['associatedSensor']}

View Source api/index.js, line 430

# inner createAxiosRequest(requestOptions)

Unit tests can fake axios request using api.get(url, {requestHandler:()=>{}})

Parameters:
Name Type Description
requestOptions Object

computed request options

options.requestHandler function

Handler to fake axios request

View Source api/index.js, line 205

# inner getApi(defaultOptions) → {Object}

Parameters:
Name Type Description
defaultOptions *

View Source api/index.js, line 60

Object