fetchExperiences

fun fetchExperiences(context: Context, experienceKeys: Set<String>, attributes: Map<String, String> = emptyMap(), onSuccess: SuccessCallback<ExperienceCampaignsResult>, onFailure: (reason: RequestFailureReasonCode, message: String) -> Unit, workspaceId: String? = null)

Fetches multiple personalized experience campaigns.

Since

1.0.0

Parameters

context

An instance of Context.

experienceKeys

The set of experience keys to fetch.

attributes

Optional attributes to filter the experiences.

onSuccess

A callback invoked with the fetched experience campaigns on success. This callback is always invoked on the main thread

onFailure

A callback invoked with the reason and message on failure. This callback is always invoked on the main thread

workspaceId

The optional workspace ID; if null, the default instance will be used.

Throws

if the SDK is not initialized for the given instance.