Contentstack

View as Markdown

Contentstack

Create a new Stack instance with stack’s apikey, deliveryToken, environment name and config.

stack(apiKey:deliveryToken:environment:region:host:apiVersion:branch:config:)

Create a new Stack instance with stack’s API key, delivery token, environment name and config.

NameTypeDescription
apiKey (required)string

stack apiKey.

deliveryToken (required)String

stack delivery token.

environment (required)String

environment name in which to perform action.

region

Contentstack region

hoststring

Name of Contentstack api server.

apiVersionstring

API version of Contentstack api server.

configContentstackConfig

Config of stack.

let stack = Contentstack.stack(apiKey: "<API_KEY>", deliveryToken: "<DELIVERY_TOKEN>", environment: "<ENVIRNOMENT>")