Installation
- Install the library
npm install --save @ordercloud/cms-sdk
- Configure the sdk if necessary
import { CMSConfiguration } from '@ordercloud/cms-sdk'
CMSConfiguration.Set({
baseApiUrl: 'https://ordercloud-cms-test.azurewebsites.net',
baseAuthUrl: 'https://auth.ordercloud.io/oauth/token',
timeoutInMilliseconds: 120 * 1000
})
- Token should be stored via ordercloud sdk in ordercloud.access-token
- Use CMS Client
import { ContentManagementClient } from '@ordercloud/cms-sdk'
const assets = await ContentManagementClient.Assets.List