JS/TS library for the Agility Fetch API
npm install @agility/content-fetch

@agility/content-fetch package and you'll also need to authenticate your requests.
npm install @agility/content-fetch
`
yarn
`
yarn add @agility/content-fetch
`
$3
`javascript
import agility from "@agility/content-fetch"
//initialize the api client
const api = agility.getApi({
guid: "[guid]",
apiKey: "[your-api-key]",
})
//make the request: get a content item with the ID 22 in locale 'en-us'
const contentItems = await api.getContentItem({
contentID: 22,
locale: "en-us",
})
`
Documentation
Full documentation for this SDK can be found in our Agility Fetch JS SDK Reference Doc.
For docs & help around Agility CMS, please see Agility CMS Documentation
Tutorials
About the Content Fetch API
Authenticating your Content Fetch API Calls
Retrieving your API Key(s), Guid, and API URL
Making your First Call with the Content Fetch API
Calilng the Content Fetch API using the Javascript SDK
Page Management in a Headless CMS
Using Agility CMS with Create React App
Creating a Module for the Agility CMS Create React App
Creating a Page Template for the Agility CMS Create React App
Deploying your Agility CMS Create React App
Content Webhooks
Contributing
If you would like to contribute to this SDK, you can fork the repository and submit a pull request. We'd love to include your updates.
$3
An essential part of contributing to this SDK is adding and running unit tests to ensure the stability of the project.
`
> npm run test
``