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
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 Function(Document document) yes - Function to be executed when the operation is completed successfully
onError Function(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 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
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:
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 Function(Document document) yes - Function to be executed when the operation is completed successfully
onError Function(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.

iOS SDK Android SDK React Native SDK Flutter SDK
Introduced in: 4.13.0 5.5.0 0.17.0 0.6.0
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 Function(RecommendationResponse recommendationResponse) yes - Function to be executed when the operation is completed successfully
onError Function(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.

iOS SDK Android SDK React Native SDK Flutter SDK
Introduced in: 4.13.0 5.5.0 0.17.0 0.6.0
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 Function(ScreenView screenView) yes - Function to be executed when the operation is completed successfully
onError Function(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 Function(ScreenView screenView) yes - Function to be executed when the operation is completed successfully
onError Function(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.

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
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 Function(Document document) yes - Function to be executed when the operation is completed successfully
onError Function(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 Function(List<Map<String, Object» documents) yes - Function to be executed when the operation is completed successfully
onError Function(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 Function(RecommendationResponse recommendationResponse) yes - Function to be executed when the operation is completed successfully
onError Function(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.

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
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 Function(ScreenViewResponse screenViewResponse) yes - Function to be executed when the operation is completed successfully
onError Function(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