contentful

contentful

Source:
See:
Contentful Delivery API SDK. Allows you to create instances of a client with access to the Contentful Content Delivery API.

Methods

(static) createClient(params) → {ContentfulClientAPI.ClientAPI}

Source:
Properties:
Name Type Attributes Description
params.space string Space ID
params.accessToken string Contentful CDA Access Token
params.insecure boolean <optional>
Requests will be made over http instead of the default https (default: true)
params.host string <optional>
API host (default: cdn.contentful.com). Also usable with preview.contentful.com.
params.httpAgent Object <optional>
Optional Node.js HTTP agent for proxying (see Node.js docs and https-proxy-agent)
params.httpsAgent Object <optional>
Optional Node.js HTTP agent for proxying (see Node.js docs and https-proxy-agent)
params.proxy Object <optional>
Optional Axios proxy (see axios docs )
params.headers Object <optional>
Optional additional headers
params.resolveLinks boolean <optional>
<nullable>
If we should resolve links between entries (default: true)
params.retryOnError boolean <optional>
<nullable>
If we should retry on errors and 429 rate limit exceptions (default: true)
params.application string <optional>
<nullable>
Application name and version e.g myApp/version
params.integration string <optional>
<nullable>
Integration name and version e.g react/version
Create a client instance
Example
const contentful = require('contentful')
const client = contentful.createClient({
 accessToken: 'myAccessToken',
 space: 'mySpaceId'
})
Parameters:
Name Type Description
params Object Client initialization parameters
Returns:
Type
ContentfulClientAPI.ClientAPI