ApiClient

interface ApiClient

Defines public API of the network coordinator service

Functions

Link copied to clipboard
abstract fun enqueueEvent(event: Event, profile: Profile)

Queue an API request to track an Event to Klaviyo for a Profile

Link copied to clipboard
abstract fun enqueueProfile(profile: Profile)

Queue an API request to save Profile data to Klaviyo

Link copied to clipboard
abstract fun enqueuePushToken(token: String, profile: Profile)

Queue an API request to save a push token to Klaviyo for a Profile

Link copied to clipboard
abstract fun flushQueue()

Tell the client to attempt to flush network request queue now

Link copied to clipboard
abstract fun offApiRequest(observer: ApiObserver)

De-register an observer from onApiRequest

Link copied to clipboard
abstract fun onApiRequest(withHistory: Boolean = false, observer: ApiObserver)

Register an observer to be notified when an API request is enqueued or changes state

Link copied to clipboard
abstract fun persistQueue()

Tell the client to write its queue to the persistent store

Link copied to clipboard
abstract fun restoreQueue()

Tell the client to restore its queue from the persistent store engine