Agility Fetch API JS SDK for retrieving content from the Agility CMS
- Source:
Namespaces
Methods
(static) getApi(config) → {AgilityFetch.Client}
How to create an instance of an an API client for the Agility Content Fetch REST API.
- Source:
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object
|
API intialization params.
|
Returns:
- Type:
-
AgilityFetch.Client
Example
import agility from '@agility/content-fetch'
const api = agility.getApi({
guid: '191309ca-e675-4be2-bb29-351879528707',
apiKey: 'aGd13M.fa30c36e553a36f871860407e902da9a7375322457acd6bcda038e60af699411',
isPreview: false
});