@atamaco/fetcher-atama
The "Atama Fetcher" is fetching experience information from the Delivery API. See fetcher to understand how to use the getAllPaths
and getData
methods. Below you'll find out how to configure the Atama Fetcher via its constructor.
Installation
npm i @atamaco/fetcher-atama
Usage
import { FetcherAtama } from '@atamaco/fetcher-atama';
const client = new FetcherAtama({
apiKey: "<CONTENT_DELIVERY_API_KEY>";
workspaceId: "<WORKSPACE_ID>";
});
API
FetcherAtama(config, logger)
Parameter | Type | Default | Required? | Description |
---|---|---|---|---|
config.apiKey | string | - | Yes | An API Key for the Delivery API |
config.workspaceId | string | - | Yes | The id of the workspace you used to publish experiences. |
config.environment | preview or prod | prod | No | Whether you want to use the "preview" or "production" environment |
config.url | string | https://cdn.atama.app | No | An alternative URL to use for the Delivery API. |
logger | Logger | - | No | A logger object to hook into the AtamaClient logs. See Logger |