Content


Generate Document


This method generates the document that is defined for the provided slug. Inserts are processed.

Note: The API key must have the SCHEMA_SERVICE_SCHEMA_READ permission from the Schema group.

Declared In:
lib/modules/content/content_impl.dart

Related To:
Document

Class:
ContentImpl

Declaration:

Future<Document> generateDocument(String slug,
      {required void Function(Document document) onSuccess,
      required void Function(SyneriseError error) onError}) async

Parameters:

Parameter Type Mandatory Default Description
slug String yes - Slug of the document
onSuccess void yes - Function to be executed when the operation is completed successfully
onError SyneriseError yes - Function to be executed when the operation is completed with an error

Return Value:
Document

Example:

    await Synerise.content.generateDocument(slugName, onSuccess: (Document document) {
      //onSuccess handling
    }, onError: (SyneriseError error) {
      //onError handling
    });

Get Recommendations (v2)


This method generates recommendations that are defined for the options provided.

Note: The API key must have the SCHEMA_SERVICE_SCHEMA_READ permission from the Schema group.

Declared In:
lib/modules/content/content_impl.dart

Related To:
RecommendationOptions
RecommendationResponse

Class:
ContentImpl

Declaration:

Future<RecommendationResponse> getRecommendationsV2(RecommendationOptions recommendationOptions,
      {required void Function(RecommendationResponse recommendationResponse) onSuccess,
      required void Function(SyneriseError error) onError}) async 

Parameters:

Parameter Type Mandatory Default Description
recommendationOptions RecommendationOptions yes - Options for recommendations
onSuccess void yes - Function to be executed when the operation is completed successfully
onError SyneriseError yes - Function to be executed when the operation is completed with an error

Return Value:
RecommendationResponse

Example:

    RecommendationOptions recommendationOptions = RecommendationOptions(
        slug: slug,
        productID: productId);
        
    await Synerise.content.getRecommendationsV2(recommendationOptions, onSuccess: (RecommendationResponse recommendationResponse) {
      //onSuccess handling
    }, onError: (SyneriseError error) {
      //onError handling
    });

Generate Screen View


This method generates a customer’s highest-priority screen view campaign from the feed with the provided feed slug.

Note: The API key must have the SCHEMA_SERVICE_SCHEMA_READ permission from the Schema group.

Declared In:
lib/modules/content/content_impl.dart

Related To:
ScreenView

Class:
ContentImpl

Declaration:

Future<ScreenView> generateScreenView(String feedSlug,
      {required void Function(ScreenView screenViewResponse) onSuccess,
      required void Function(SyneriseError error) onError}) async

Parameters:

Parameter Type Mandatory Default Description
feedSlug String yes - Identifies the feed from which the screen view is selected.
onSuccess void yes - Function to be executed when the operation is completed successfully
onError SyneriseError yes - Function to be executed when the operation is completed with an error

Return Value:
ScreenView

Example:

    await Synerise.content.generateScreenView(slug, onSuccess: (ScreenView screenViewResponse) {
      //onSuccess handling
    }, onError: (SyneriseError error) {
      //onError handling
    });

Deprecated methods

Get document


This method generates the document that is defined for the provided slug.

Note: The API key must have the SCHEMA_SERVICE_DOCUMENT_READ permission from the Document group.

Declared In:
lib/modules/content/content_impl.dart

Class:
ContentImpl

Declaration:

Future<Map<String, Object>> getDocument(String slug,
      {required void Function(Map<String, Object> document) onSuccess,
      required void Function(SyneriseError error) onError}) async

Parameters:

Parameter Type Mandatory Default Description
slug String yes - Name of the slug
onSuccess void yes - Function to be executed when the operation is completed successfully
onError SyneriseError yes - Function to be executed when the operation is completed with an error

Return Value:
Document as Map<String, Object>

Example:

    await Synerise.content.getDocument(slug, onSuccess: (Map<String, Object> document) {
      //onSuccess handling
    }, onError: (SyneriseError error) {
      //onError handling
    });

Get documents


This method generates documents that are defined for parameters provided in the query object.

Note: The API key must have the SCHEMA_SERVICE_DOCUMENT_READ permission from the Document group.

Declared In:
lib/modules/content/content_impl.dart

Related To:
DocumentsApiQuery

Class:
ContentImpl

Declaration:

Future<List<Map<String, Object>>> getDocuments(DocumentsApiQuery documentsApiQuery,
      {required void Function(List<Map<String, Object>> documentsList) onSuccess,
      required void Function(SyneriseError error) onError}) async

Parameters:

Parameter Type Mandatory Default Description
documentsApiQuery DocumentsApiQuery yes - Object for configuration of the query parameters
onSuccess void yes - Function to be executed when the operation is completed successfully
onError SyneriseError yes - Function to be executed when the operation is completed with an error

Return Value:
List of documents as Map<String, Object>

Example:

    await Synerise.content.getDocuments(documentsApiQuery, onSuccess: (List<Map<String, Object>> documentsList) {
      //onSuccess handling
    }, onError: (SyneriseError error) {
      //onError handling
    });

Get recommendations


This method generates recommendations that are defined for the options provided.

Note: The API key must have the SCHEMA_SERVICE_DOCUMENT_READ permission from the Document group.

Declared In:
lib/modules/content/content_impl.dart

Related To:
RecommendationOptions
RecommendationResponse

Class:
ContentImpl

Declaration:

Future<RecommendationResponse> getRecommendations(RecommendationOptions recommendationOptions,
      {required void Function(RecommendationResponse recommendationResponse) onSuccess,
      required void Function(SyneriseError error) onError}) async

Parameters:

Parameter Type Mandatory Default Description
recommendationOptions RecommendationOptions yes - Object for configuration of the options parameters
onSuccess void yes - Function to be executed when the operation is completed successfully
onError SyneriseError yes - Function to be executed when the operation is completed with an error

Return Value:
RecommendationResponse

Example:

    await Synerise.content.getRecommendations(recommendationOptions, onSuccess: (RecommendationResponse recommendationResponse) {
      //onSuccess handling
    }, onError: (SyneriseError error) {
      //onError handling
    });

Get screen view


This method generates the customer’s highest-priority screen view campaign.

Note: The API key must have the SCHEMA_SERVICE_SCHEMA_READ permission from the Schema group.

Declared In:
lib/modules/content/content_impl.dart

Related To:
ScreenViewResponse

Class:
ContentImpl

Declaration:

Future<ScreenViewResponse> getScreenView(
      {required void Function(ScreenViewResponse screenViewResponse) onSuccess,
      required void Function(SyneriseError error) onError}) async

Return Value:
ScreenViewResponse

Example: ss

    await Synerise.content.getScreenView(onSuccess: (ScreenViewResponse screenViewResponse) {
      //onSuccess handling
    }, onError: (SyneriseError error) {
      //onError handling
    });

😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker