Content
Generate document
This method generates the document that is defined for the provided slug. Inserts are processed.
iOS SDK | Android SDK | React Native SDK | Flutter SDK | |
---|---|---|---|---|
Introduced in: | 4.13.0 | 5.5.0 | 0.17.0 | 0.6.0 |
SCHEMA_SERVICE_SCHEMA_READ
permission from the Schema group.Related To:
Document
Class:
Content
Declaration:
public static IDataApiCall<Document> generateDocument(String slugName)
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
slugName | String | yes | - | Slug of the document |
Return Value: IDataApiCall <Document> object to execute the request.
Example:
apiCall = Content.generateDocument("slug");
apiCall.execute(this::onSuccess, this::onFailure);
Generate document with query parameters
This method generates the document that is defined for the parameters provided in the query object.
iOS SDK | Android SDK | React Native SDK | Flutter SDK | |
---|---|---|---|---|
Introduced in: | 4.18.0 | 5.19.0 | 0.22.0 | 1.2.0 |
SCHEMA_SERVICE_SCHEMA_READ
permission from the Schema group.Related To:
DocumentApiQuery
Document
Class:
Content
Declaration:
public static IDataApiCall<Document> generateDocument(DocumentApiQuery documentApiQuery)
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
apiQuery | DocumentApiQuery | yes | - | Object that stores all query parameters |
Return Value: IDataApiCall <Document> object to execute the request.
Get recommendations (v2)
This method generates recommendations that are defined for the options provided.
iOS SDK | Android SDK | React Native SDK | Flutter SDK | |
---|---|---|---|---|
Introduced in: | 4.13.0 | 5.5.0 | 0.17.0 | 0.6.0 |
SCHEMA_SERVICE_SCHEMA_READ
permission from the Schema group.Related To:
RecommendationRequestBody
RecommendationResponse
Class:
Content
Declaration:
public static IDataApiCall<RecommendationResponse> getRecommendations(String slugName, RecommendationRequestBody options)
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
slugName | String | yes | - | Slug of the document |
options | RecommendationRequestBody | yes | - | Object which stores the ID of an item to generate recommendations for. |
Return Value:
IDataApiCall<RecommendationResponse> object to execute the request.
Example:
RecommendationRequestBody requestBody = new RecommendationRequestBody();
requestBody.setProductId("1");
String slugName = "testSlugName";
apiCall = Content.getRecommendationsV2(slugName, requestBody);
apiCall.execute(this::onSuccess, this::onFailure);
Generate screen view
This method generates a customer’s highest-priority screen view campaign from the feed with the provided feed slug.
iOS SDK | Android SDK | React Native SDK | Flutter SDK | |
---|---|---|---|---|
Introduced in: | 4.13.0 | 5.5.0 | 0.17.0 | 0.6.0 |
SCHEMA_SERVICE_SCHEMA_READ
permission from the Schema group.Related To:
ScreenView
Class:
Content
Declaration:
public static IDataApiCall<ScreenView> generateScreenView(String feedSlug)
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
feedSlug | String | yes | - | Identifies a specific screen view feed |
Return Value:
IDataApiCall <ScreenView> object to execute the request.
Generate screen view with query parameters
This method generates customer’s highest-priority screen view campaign that is defined for parameters provided in the query object.
Related To:
ScreenViewApiQuery
ScreenView
Class:
Content
Declaration:
public static IDataApiCall<ScreenView> generateScreenView(ScreenViewApiQuery screenViewApiQuery)
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
apiQuery | ScreenViewApiQuery | yes | - | Object that stores all query parameters |
Return Value:
IDataApiCall <ScreenView> object to execute the request.
Deprecated methods
Get document
This method generates the document that is defined for the provided slug.
iOS SDK | Android SDK | React Native SDK | Flutter SDK | |
---|---|---|---|---|
Introduced in: | 3.4.8 | 3.4.2 | 0.9.10 | 0.2.0 |
Deprecated in: | 4.13.0 | 5.5.0 | 0.17.0 | 0.6.0 |
SCHEMA_SERVICE_DOCUMENT_READ
permission from the Document group.Class:
Content
Declaration
public static IDataApiCall<Object> getDocument(String slugName)
Parameters
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
slugName | String | yes | - | Slug of the document |
Return Value
IDataApiCall <Object> object to execute the request.
Example
apiCall = Content.getDocument("slug");
apiCall.execute(this::onSuccess, this::onFailure);
Get documents
This method generates documents that are defined for parameters provided in the query object.
SCHEMA_SERVICE_DOCUMENT_READ
permission from the Document group.Class:
Content
Declaration
public static IDataApiCall<List<Object>> getDocument(DocumentsApiQuery documentsApiQuery)
Parameters
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
documentsApiQuery | DocumentsApiQuery | yes | - | Object for configuration of the query parameters |
Return Value
IDataApiCall <List<Object» object to execute the request.
Example
DocumentsApiQuery documentsApiQuery = new DocumentsApiQuery();
documentsApiQuery.setVersion("1.0.0");
documentsApiQuery.setDocumentQueryParameters(DocumentsApiQueryType.SCHEMA, "promotions");
apiCall = Content.getDocuments(documentsApiQuery);
apiCall.execute(this::onSuccess, this::onFailure);
Get recommendations
This method generates recommendations that are defined for the options provided.
SCHEMA_SERVICE_DOCUMENT_READ
permission from the Document group.Related To:
RecommendationResponse
Class:
Content
Declaration
public static IDataApiCall<RecommendationResponse> getRecommendations(String slugName, RecommendationRequestBody options)
Parameters
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
slugName | String | yes | - | Slug of the document |
options | RecommendationRequestBody | yes | - | Object which stores the ID of an item to generate recommendations for. |
Return Value
IDataApiCall<RecommendationResponse> object to execute the request.
Example
RecommendationRequestBody requestBody = new RecommendationRequestBody();
requestBody.setProductId("1");
String slugName = "testSlugName";
apiCall = Content.getRecommendations(slugName, requestBody);
apiCall.execute(this::onSuccess, this::onFailure);
Get screen view
This method generates the customer’s highest-priority screen view campaign.
iOS SDK | Android SDK | React Native SDK | Flutter SDK | |
---|---|---|---|---|
Introduced in: | 3.7.1 | 3.7.1 | 0.9.10 | 0.2.0 |
Deprecated in: | 4.13.0 | 5.5.0 | 0.17.0 | 0.6.0 |
SCHEMA_SERVICE_SCHEMA_READ
permission from the Schema group.Related To:
ScreenViewResponse
Class:
Content
Declaration
public static IDataApiCall<ScreenViewResponse> getScreenView()
Parameters There are no parameters.
Return Value
IDataApiCall<ScreenViewResponse> object to execute the request.
Example
apiCall = Content.getScreenView();
apiCall.execute(this::onSuccess, this::onFailure);