UserWise Unity SDK  3.0.0
Public Member Functions | Static Public Attributes | Properties | Events | List of all members
UserWiseSDK.UserWise Class Reference

Public Member Functions

void SetApiKey (string apiKey)
 Sets the provided apiKey. More...
 
UserWise Initialize (string apiKey, string userId)
 Sets the apiKey and userId provided. More...
 
void Start ()
 Tells the UserWise SDK to start all background operations. Due to the way UserWise operates this method is not necessary after user initialization as the background operations will start as soon as we can initialize the app user with the provided apiKey and userId. More...
 
void Stop ()
 Tells the UserWise SDK to stop all background operations. When/if UserWise should start again call Start(); More...
 
void RefreshContent ()
 Updates the player's currently matching segments for the session and, if successful, will force all UserWise modules to pull a refreshed content list. More...
 
void RefreshContent (Action< bool > completed)
 Updates the player's currently matching segments for the session and, if successful, will force all UserWise modules to pull a refreshed content list. More...
 
void RefreshContent (Action< bool > completed, int timeout)
 Updates the player's currently matching segments for the session and, if successful, will force all UserWise modules to pull a refreshed content list. More...
 
bool IsSessionInitialized ()
 Is a session currently initialized and active? More...
 
void GetMedia (string mediaId, Action< bool, MediaInfo > handler)
 Retrieve full media information for a specific UserWise Media Library item. More...
 
void GetRawDataFromMediaId (string mediaId, bool ignoreCache, Action< bool, byte[]> handler)
 Loads the underlying bitmap for the provided Media ID. If the media has been loaded during this App Session (different from play session), the media information will not query for updated media data. More...
 
void GetRawDataFromUrl (string url, bool ignoreCache, Action< bool, byte[]> handler)
 Loads the underlying bitmap for the provided URL. If the media at the url has been loaded already, a local cache will be used instead. More...
 
UserWise AssignEvent (PlayerEvent playerEvent, Action< Boolean > callback)
 Assigns an event (w/ optional event attributes) to the initialized appuser. More...
 
UserWise SetAttributes (List< PlayerAttribute > playerAttributes, Action< Boolean > callback)
 Upserts the provided attributes onto the app user's record. More...
 
UserWise TransitionToRegion (Region region, Action< Boolean > callback)
 Emit a region transition for ther user. More...
 
UserWise SetEngagementOutcome (string outcomeKey, OutcomeType type, Action< Boolean > callback)
 

Static Public Attributes

static string VERSION = "3.2.7"
 

Properties

bool IsRunning [get]
 
CampaignsModule CampaignsModule [get]
 
EmailsModule EmailsModule [get]
 
EventsModule EventsModule [get]
 
MessagesModule MessagesModule [get]
 
OffersModule OffersModule [get]
 
PushNotificationsModule PushNotificationsModule [get]
 
RemoteConfigsModule RemoteConfigsModule [get]
 
SurveysModule SurveysModule [get]
 
string HostOverride [get, set]
 
string UserId [get, set]
 
string SessionId [get, set]
 
string EnvironmentStage [get, set]
 
static UserWise INSTANCE [get]
 

Events

EventHandler< OnStartEventArgsOnStart
 
EventHandler OnSessionInitializationAttemptFailed
 
EventHandler< OnSessionInitializedEventArgsOnSessionInitialized
 
EventHandler OnSessionSegmentsRefreshed
 
EventHandler OnStop
 

Member Function Documentation

◆ AssignEvent()

UserWise UserWiseSDK.UserWise.AssignEvent ( PlayerEvent  playerEvent,
Action< Boolean >  callback 
)
inline

Assigns an event (w/ optional event attributes) to the initialized appuser.

Parameters
playerEventPlayerEvent to assign to the user
callbackDelegate called after receiving an API response

◆ GetMedia()

void UserWiseSDK.UserWise.GetMedia ( string  mediaId,
Action< bool, MediaInfo handler 
)
inline

Retrieve full media information for a specific UserWise Media Library item.

Parameters
mediaIdThe ID of the media library item
handlerCompletion handler

◆ GetRawDataFromMediaId()

void UserWiseSDK.UserWise.GetRawDataFromMediaId ( string  mediaId,
bool  ignoreCache,
Action< bool, byte[]>  handler 
)
inline

Loads the underlying bitmap for the provided Media ID. If the media has been loaded during this App Session (different from play session), the media information will not query for updated media data.

Parameters
mediaIdMedia ID
ignoreCacheShould we ignore the locally downloaded file cache?
handlerCompletion handler

◆ GetRawDataFromUrl()

void UserWiseSDK.UserWise.GetRawDataFromUrl ( string  url,
bool  ignoreCache,
Action< bool, byte[]>  handler 
)
inline

Loads the underlying bitmap for the provided URL. If the media at the url has been loaded already, a local cache will be used instead.

Parameters
urlFull URL to the media
ignoreCacheShould we ignore the local cache? (Still caches on successful download)
handlerCompletion handler (success/failure)

◆ Initialize()

UserWise UserWiseSDK.UserWise.Initialize ( string  apiKey,
string  userId 
)
inline

Sets the apiKey and userId provided.

◆ IsSessionInitialized()

bool UserWiseSDK.UserWise.IsSessionInitialized ( )
inline

Is a session currently initialized and active?

Returns
Boolean indiciating if UserWise has an active session.

◆ RefreshContent() [1/3]

void UserWiseSDK.UserWise.RefreshContent ( )
inline

Updates the player's currently matching segments for the session and, if successful, will force all UserWise modules to pull a refreshed content list.

This method defaults to a 30 second timeout.

If you would like to listen for completion of this operation, use the RefreshContent(Action<bool>) or RefreshContent(Action<bool>, int) overloads.

◆ RefreshContent() [2/3]

void UserWiseSDK.UserWise.RefreshContent ( Action< bool >  completed)
inline

Updates the player's currently matching segments for the session and, if successful, will force all UserWise modules to pull a refreshed content list.

This method defaults to a 30 second timeout.

If you would like to also control the timout of this operation, use the RefreshContent(Action<bool>, int) overload.

◆ RefreshContent() [3/3]

void UserWiseSDK.UserWise.RefreshContent ( Action< bool >  completed,
int  timeout 
)
inline

Updates the player's currently matching segments for the session and, if successful, will force all UserWise modules to pull a refreshed content list.

Parameters
completedRequest completion handler. Boolean param indicates success (true) or failure (false).

◆ SetApiKey()

void UserWiseSDK.UserWise.SetApiKey ( string  apiKey)
inline

Sets the provided apiKey.

◆ SetAttributes()

UserWise UserWiseSDK.UserWise.SetAttributes ( List< PlayerAttribute playerAttributes,
Action< Boolean >  callback 
)
inline

Upserts the provided attributes onto the app user's record.

Parameters
playerAttributesPlayerAttributes to assign to the user
callbackDelegate called after receiving an API response

◆ Start()

void UserWiseSDK.UserWise.Start ( )
inline

Tells the UserWise SDK to start all background operations. Due to the way UserWise operates this method is not necessary after user initialization as the background operations will start as soon as we can initialize the app user with the provided apiKey and userId.

◆ Stop()

void UserWiseSDK.UserWise.Stop ( )
inline

Tells the UserWise SDK to stop all background operations. When/if UserWise should start again call Start();

◆ TransitionToRegion()

UserWise UserWiseSDK.UserWise.TransitionToRegion ( Region  region,
Action< Boolean >  callback 
)
inline

Emit a region transition for ther user.

Parameters
regionRegion the user has transitioned to

The documentation for this class was generated from the following file: