Content
Generate document
This method generates the document that is defined for the provided slug. Inserts are processed.
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);
Get recommendations (v2)
This method generates recommendations that are defined for the options provided.
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.
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 |
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.
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.
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);