Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StagingEnvironmentFactory

Amplience Virtual Staging Environment factory.

This factory is intended to be used by end user applications to preview content for a given snapshotID or at a given timestamp.

It works by passing the virtual staging environment domain and the snapshotID or timestamp to the virtual-staging API, which will return a new domain that can be used in the ContentClient.

Example:

const factory = new StagingEnvironmentFactory('11122222gggg232gg32g32g.staging.bigcontent.io');
const stagingEnvironmentWithSnapshot = await factory.generateDomain({snapshotId: 'abcdef123456'});

const client = new ContentClient({
  account: 'test',
  stagingEnvironment: stagingEnvironmentWithSnapshot
});

You may override other settings when constructing the client but if no additional configuration is provided sensible defaults will be used.

Hierarchy

  • StagingEnvironmentFactory

Index

Constructors

constructor

Properties

Private Readonly client

client: AxiosInstance

Private Readonly stagingEnvironment

stagingEnvironment: string

Methods

Protected buildUrl

Protected createClient

generateDomain

Generated using TypeDoc