Entry
Entry
The Entry provides data based on entry uid
only
Specifies an array of only keys in BASE object that would be included in the response.
| Name | Type | Description |
|---|---|---|
| fieldUid (required) | List<String> | The field uid is list of string |
import Contentstack
final stack = contentstack.stack(apiKey, delieveryToken, environment)
final entry = stack.contentType('contentType').entry("uid");
entry.only(fieldUid);locale
This method also includes the content type UIDs of the referenced entries returned in the response.
| Name | Type | Description |
|---|---|---|
| locale (required) | String | The locale code |
import Contentstack
final stack = contentstack.stack(apiKey, delieveryToken, environment)
final entry = stack.contentType('contentType').entry("uid");
entry.locale('en-eu');includeReferenceContentTypeUID
This method also includes the content type UIDs of the referenced entries returned in the response.
import Contentstack
final stack = contentstack.stack(apiKey, delieveryToken, environment)
final entry = stack.contentType('contentType').entry("uid");
entry.includeReferenceContentTypeUID();includeReference
Include Reference: When you fetch an entry of a content type that has a reference field, by default, the content of the referred entry is not fetched. It only fetches the UID of the referred entry, along with the content of the specified entry.
| Name | Type | Description |
|---|---|---|
| referenceFieldUid (required) | String | referenceFieldUid Key who has reference to some other class object |
| includeReferenceField | Include | includeReference provides three options, none, only and except |
import Contentstack
final stack = contentstack.stack(apiKey, delieveryToken, environment)
final entry = stack.contentType('contentType').entry("uid");
entry.includeReference("referenceFieldUid", IncludeReference.none(fieldUidList: null));includeBranch
Includes branch in the response
import Contentstack
final stack = contentstack.stack(apiKey, delieveryToken, environment)
final entry = stack.contentType('contentType').entry("uid");
entry.includeBranch();includeEmbeddedItems
Include Embedded Objects (Entries and Assets) along with entry/entries details
import Contentstack
final stack = contentstack.stack(apiKey, delieveryToken, environment)
final entry = stack.contentType('contentType').entry("uid");
entry.includeEmbeddedItems();includeFallback
Retrieve the published content of the fallback locale if an entry is not localized in specified locale.
import Contentstack
final stack = contentstack.stack(apiKey, delieveryToken, environment)
final entry = stack.contentType('contentType').entry("uid");
entry.includeFallback();includeContentType
Include Content Type of all returned objects along with objects themselves
import Contentstack
final stack = contentstack.stack(apiKey, delieveryToken, environment)
final entry = stack.contentType('contentType').entry("uid");
entry.includeContentType();except
Specifies list of field uids that would be excluded from the response.
| Name | Type | Description |
|---|---|---|
| fieldUid (required) | List<String> | field uid which get excluded from the response |
import Contentstack
final stack = contentstack.stack(apiKey, delieveryToken, environment)
final entry = stack.contentType('contentType').entry("uid");
entry.except(fieldUid); //addParam
This method adds key and value to an Entry.
| Name | Type | Description |
|---|---|---|
| key (required) | String | The key as string which needs to be added to an Entry |
| value (required) | String | The value as string which needs to be added to an Entry |
import Contentstack
final stack = contentstack.stack(apiKey, delieveryToken, environment)
final entry = stack.contentType('contentType').entry("uid");
entry.addParam(key, value);