Contentstack
Contentstack
Contentstack class that exposes Stack instance
stack
The stack method provides access to the stack of your site, allowing users to retrieve and manage content within a single space.
| Name | Type | Description |
|---|---|---|
| context (required) | ApplicationContext | The application context |
| apiKey (required) | String | API Key of your application on Contentstack |
| deliveryToken (required) | String | Delivery Tokens retrieves only the published entries of the environment with which it is associated |
| environment (required) | String | |
| config | Config | Config instance to set environment and other configuration details. |
import com.contentstack.sdk.*; Stack stack = Contentstack.stack(context, "apiKey", "deliveryToken", "environment");
Example with Config:
import com.contentstack.sdk.*;
Config config = new Config().setHost("api.contentstack.io");
Stack stack = Contentstack.stack(context, "apiKey", "deliveryToken", "environment");