WidgetViewModel
abstract class WidgetViewModel<T : Resource>(configurationOnce: Once<SdkConfiguration>, currentProfileOnce: Once<LiveLikeProfile>, var onDismiss: () -> Unit?, analyticsService: AnalyticsService, networkApiClient: NetworkApiClient, rewardItemMapCache: Map<String, RewardItem>, userProfileDelegate: UserProfileDelegate?, dataStoreDelegate: DataStoreDelegate, viewModelDispatcher: CoroutineDispatcher, uiDispatcher: CoroutineDispatcher) : BaseViewModel
Inheritors
Constructors
Link copied to clipboard
constructor(configurationOnce: Once<SdkConfiguration>, currentProfileOnce: Once<LiveLikeProfile>, onDismiss: () -> Unit?, analyticsService: AnalyticsService, networkApiClient: NetworkApiClient, rewardItemMapCache: Map<String, RewardItem>, userProfileDelegate: UserProfileDelegate?, dataStoreDelegate: DataStoreDelegate, viewModelDispatcher: CoroutineDispatcher, uiDispatcher: CoroutineDispatcher)
constructor(widgetInfos: WidgetInfos, configurationOnce: Once<SdkConfiguration>, currentProfileOnce: Once<LiveLikeProfile>, programRepository: ProgramRepository? = null, widgetMessagingClient: (RealTimeClientMessage) -> Unit? = null, onDismiss: () -> Unit?, analyticsService: AnalyticsService, networkApiClient: NetworkApiClient, rewardItemMapCache: Map<String, RewardItem>, userProfileDelegate: UserProfileDelegate?, dataStoreDelegate: DataStoreDelegate, viewModelDispatcher: CoroutineDispatcher, uiDispatcher: CoroutineDispatcher)
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun getGamificationReward(rewardUrl: String, analyticsService: AnalyticsService, userAccessToken: String): ProgramGamificationProfile?
Link copied to clipboard
checks if widgets expired interactive_until
Link copied to clipboard
will be called after timer completion or can be called manually after interaction finished
Link copied to clipboard
Link copied to clipboard
protected fun <T : Any> safeCallBack(liveLikeCallBack: LiveLikeCallback<T>? = null, call: suspend (Pair<LiveLikeProfile, SdkConfiguration>) -> T?)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
protected fun trackWidgetBecameInteractive(widgetType: WidgetType?, widgetId: String, programId: String)
Link copied to clipboard
fun trackWidgetEngagedAnalytics(currentWidgetType: WidgetType?, currentWidgetId: String, programId: String, widgetPrompt: String)
Link copied to clipboard
Link copied to clipboard
protected suspend fun voteAsync(widgetVotingUrl: String, voteId: String? = null, body: Map<String, Any>? = null, type: RequestType? = null, useVoteUrl: Boolean = true, currentProfileOnce: Once<LiveLikeProfile>, widgetId: String? = null, patchVoteUrl: String? = null, rewardItemMapCache: Map<String, RewardItem>, userProfileRewardDelegate: UserProfileDelegate?): VoteResponse