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<void> 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 (Document document) yes - Function to be executed when the operation is completed successfully
onError (SyneriseError error) yes - Function to be executed when the operation is completed with an error

Return Value:
No value is returned.

Example:

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

Generate document with query parameters


This method generates the document that is defined for parameters provided in the query object.

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

Related To:
DocumentApiQuery
Document

Class:
ContentImpl

Declaration:

Future<void> generateDocumentWithApiQuery(DocumentApiQuery apiQuery,
      {required void Function(Document document) onSuccess,
      required void Function(SyneriseError error) onError}) async

Parameters:

Parameter Type Mandatory Default Description
apiQuery DocumentApiQuery yes - Object that stores all query parameters
onSuccess (Document document) yes - Function to be executed when the operation is completed successfully
onError (SyneriseError error) yes - Function to be executed when the operation is completed with an error

Return Value:
No value is returned.

Example:

DocumentApiQuery apiQuery = DocumentApiQuery(slug: "SLUG");

await Synerise.content.generateDocumentWithApiQuery(apiQuery, 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<void> 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 (RecommendationResponse recommendationResponse) yes - Function to be executed when the operation is completed successfully
onError (SyneriseError error) yes - Function to be executed when the operation is completed with an error

Return Value:
No value is returned.

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<void> generateScreenView(String feedSlug,
      {required void Function(ScreenView screenView) onSuccess,
      required void Function(SyneriseError error) onError}) async

Parameters:

Parameter Type Mandatory Default Description
feedSlug String yes - Identifies a specific screen view feed
onSuccess (ScreenView screenView) yes - Function to be executed when the operation is completed successfully
onError (SyneriseError error) yes - Function to be executed when the operation is completed with an error

Return Value:
No value is returned.

Example:

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

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.

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

Related To:
ScreenViewApiQuery ScreenView

Class:
ContentImpl

Declaration:

Future<void> generateScreenViewWithApiQuery(ScreenViewApiQuery apiQuery,
      {required void Function(ScreenView screenView) onSuccess,
      required void Function(SyneriseError error) onError}) async

Parameters:

Parameter Type Mandatory Default Description
apiQuery ScreenViewApiQuery yes - Object that stores all query parameters
onSuccess (ScreenView screenView) yes - Function to be executed when the operation is completed successfully
onError (SyneriseError error) yes - Function to be executed when the operation is completed with an error

Return Value:
No value is returned.

Example:

ScreenViewApiQuery apiQuery = ScreenViewApiQuery(feedSlug: "FEED_SLUG");
apiQuery.productId = "PRODUCT_ID";

await Synerise.content.generateScreenViewWithApiQuery(apiQuery, onSuccess: (ScreenView screenView) {
  //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<void>> 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 (Document document) yes - Function to be executed when the operation is completed successfully
onError (SyneriseError error) yes - Function to be executed when the operation is completed with an error

Return Value:
No value is returned.

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<void> 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 (List<Map<String, Object» documents) yes - Function to be executed when the operation is completed successfully
onError (SyneriseError error) yes - Function to be executed when the operation is completed with an error

Return Value:
No value is returned.

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<void> 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 (RecommendationResponse recommendationResponse) yes - Function to be executed when the operation is completed successfully
onError (SyneriseError error) yes - Function to be executed when the operation is completed with an error

Return Value:
No value is returned.

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<void> getScreenView(
      {required void Function(ScreenViewResponse screenViewResponse) onSuccess,
      required void Function(SyneriseError error) onError}) async

Parameters:

Parameter Type Mandatory Default Description
onSuccess (ScreenViewResponse screenViewResponse) yes - Function to be executed when the operation is completed successfully
onError (SyneriseError error) yes - Function to be executed when the operation is completed with an error

Return Value:
No value is returned.

Example:

    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