Class

AmpConfig

AmpConfig

This corresponds to the publisher's AMP configuration.

See AmpConfig.getAmpConfig.

Methods

static getAmpConfig(client) → {Promise.<AmpConfig>}

This method returns the amp config. You might want to memoize this, similar to the below

const ampConfig = config.memoizeAsync("amp-config", async () => await AmpConfig.getAmpConfig(client))
Parameters:
Name Type Description
client Client

View Source index.js, line 1195

A Promise that returns an instance of AmpConfig

Promise.<AmpConfig>

asJson()

Use this to convert to a simple javascript object, suitable for JSON.

View Source index.js, line 1182