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.Declared In:
lib/main/modules/ContentModule.js
Related To:
Document
Class:
ContentModule
Declaration:
public generateDocument(slug: string, onSuccess: (document: Document) => void, onError: (error: Error) => void)
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
slug | string | yes | - | Name of the slug |
onSuccess | Function | no | - | Function to be executed when the operation is completed successfully |
onError | Function | no | - | Function to be executed when the operation is completed with an error |
Return Value:
No value is returned.
Example:
Synerise.Content.generateDocument('slugName', function(document) {
//success
}, function(error) {
//failure
})
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.Declared In:
lib/main/modules/ContentModule.js
Related To:
DocumentApiQuery
Document
Class:
ContentModule
Declaration:
public generateDocumentWithApiQuery(apiQuery: DocumentApiQuery, onSuccess: (document: Document) => void, onError: (error: Error) => void)
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
apiQuery | DocumentApiQuery | yes | - | Object that stores all query parameters |
onSuccess | Function | no | - | Function to be executed when the operation is completed successfully |
onError | Function | no | - | Function to be executed when the operation is completed with an error |
Return Value:
No value is returned.
Example:
let apiQuery = new DocumentApiQuery('SLUG');
documentApiQuery.productId = "PRODUCT_ID";
Synerise.Content.generateDocumentWithApiQuery(apiQuery, function(document) {
//success
}, function(error) {
//failure
})
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.Declared In:
lib/main/modules/ContentModule.js
Related To:
RecommendationOptions
Class:
ContentModule
Declaration:
public getRecommendationsV2(options: RecommendationOptions, onSuccess: (recommendationResponse: RecommendationResponse) => void, onError: (error: Error) => void)
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
recommendationOptions | RecommendationOptions | yes | - | Object for configuration of the options parameters |
onSuccess | Function | no | - | Function to be executed when the operation is completed successfully |
onError | Function | no | - | Function to be executed when the operation is completed with an error |
Return Value:
No value is returned.
Example:
let recommendationOptions = new RecommendationOptions()
recommendationOptions.productID = 'productID'
recommendationOptions.slug = 'slugName'
Synerise.Content.getRecommendationsV2(recommendationOptions, function(recommendationResponse) {
//success
},function(error) {
//failure
});
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.Declared In:
lib/main/modules/ContentModule.js
Related To:
ScreenView
Class:
ContentModule
Declaration:
public generateScreenView(feedSlug: string, onSuccess: (screenView: ScreenView) => void, onError: (error: Error) => void)
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
feedSlug | string | yes | - | Identifies a specific screen view feed |
onSuccess | Function | no | - | Function to be executed when the operation is completed successfully |
onError | Function | no | - | Function to be executed when the operation is completed with an error |
Return Value:
No value is returned.
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/main/modules/ContentModule.js
Related To:
ScreenViewApiQuery
ScreenView
Class:
ContentModule
Declaration:
public generateScreenViewWithApiQuery(apiQuery: ScreenViewApiQuery, onSuccess: (screenView: ScreenView) => void, onError: (error: Error) => void)
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
apiQuery | ScreenViewApiQuery | yes | - | Object that stores all query parameters |
onSuccess | Function | no | - | Function to be executed when the operation is completed successfully |
onError | Function | no | - | Function to be executed when the operation is completed with an error |
Return Value:
No value is returned.
Example:
let apiQuery = new ScreenViewApiQuery("FEED_SLUG", "PRODUCT_ID");
Synerise.Content.generateScreenViewWithApiQuery(apiQuery, function(screenView) {
//success
},function(error) {
//failure
})
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.Declared In:
lib/main/modules/ContentModule.js
Class:
ContentModule
Declaration:
public getDocument(slug: string, onSuccess: (document: Object) => void, onError: (error: Error) => void)
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
slug | string | yes | - | Name of the slug |
onSuccess | Function | no | - | Function to be executed when the operation is completed successfully |
onError | Function | no | - | Function to be executed when the operation is completed with an error |
Return Value:
No value is returned.
Example:
Synerise.Content.getDocument('slugName', function(document) {
//success
}, function(error) {
//failure
})
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.Declared In:
lib/main/modules/ContentModule.js
Related To:
DocumentsApiQuery
Class:
ContentModule
Declaration:
public getDocuments(apiQuery: DocumentsApiQuery, onSuccess: (documents: Array<Object>) => void, onError: (error: Error) => void)
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
documentsApiQuery | DocumentsApiQuery | yes | - | DocumentsApiQuery object responsible for storing all query parameters |
onSuccess | Function | no | - | Function to be executed when the operation is completed successfully |
onError | Function | no | - | Function to be executed when the operation is completed with an error |
Return Value:
No value is returned.
Example:
let documentsApiQuery = new DocumentsApiQuery(DocumentsApiQueryType.SCHEMA, 'type', '1.0.0')
Synerise.Content.getDocuments(documentsApiQuery, function(documents) {
//success
}, function(error) {
//failure
})
Get recommendations
This method generates recommendations that are defined for the options provided.
SCHEMA_SERVICE_DOCUMENT_READ
permission from the Document group.Declared In:
lib/main/modules/ContentModule.js
Related To:
RecommendationOptions
Class:
ContentModule
Declaration:
public getRecommendations(options: RecommendationOptions, onSuccess: (recommendationResponse: RecommendationResponse) => void, onError: (error: Error) => void)
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
recommendationOptions | RecommendationOptions | yes | - | Object for configuration of the options parameters |
onSuccess | Function | no | - | Function to be executed when the operation is completed successfully |
onError | Function | no | - | Function to be executed when the operation is completed with an error |
Return Value:
No value is returned.
Example:
let recommendationOptions = new RecommendationOptions()
recommendationOptions.productID = 'productID'
recommendationOptions.slug = 'slugName'
Synerise.Content.getRecommendations(recommendationOptions, function(recommendationResponse) {
//success
},function(error) {
//failure
});
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.Declared In:
lib/main/modules/ContentModule.js
Related To:
ScreenViewResponse
Class:
ContentModule
Declaration:
public getScreenView(onSuccess: (screenViewResponse: ScreenViewResponse) => void, onError: (error: Error) => void)
Parameters:
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
onSuccess | Function | no | - | Function to be executed when the operation is completed successfully |
onError | Function | no | - | Function to be executed when the operation is completed with an error |
Return Value:
No value is returned.