Skip to content

XMediator::Api::Rewarded

Inherits from IDisposable

Public Events

Name
Action< PrebiddingResults > OnPrebiddingFinished()
Notifies when the prebidding call finished, containing a PrebiddingResults object.
Action< LoadResult > OnLoaded()
Notifies when the rewarded was loaded successfully, containing a LoadResult object.
Action< LoadError, LoadResult > OnFailedToLoad()
Notifies when the rewarded failed to load, containing a LoadError object describing the error and optionally a LoadResult object.
Action< ShowError > OnFailedToShow()
Notifies when the rewarded failed to show, containing a ShowError object describing the error.
Action OnShowed()
Notifies when the rewarded was shown.
Action< ImpressionData > OnImpression()
Notifies when the rewarded impression was recorded, containing an ImpressionData object.
Action OnClicked()
Notifies when the rewarded was clicked.
Action OnDismissed()
Notifies when the rewarded was dismissed.
Action OnEarnedReward()
Notifies when the user should be granted a reward for watching the ad. This callback won't be called if the user skipped the ad.

Public Functions

Name
Rewarded Create(string placementId, bool test =false, bool verbose =false)
Creates a new instance of a Rewarded.
void Load(CustomProperties customProperties =null)
Starts a new load call.
bool IsReady()
Indicates if the rewarded is ready to show.
void Show()
Shows a previously loaded rewarded.
void Show(string adSpace)
Shows a previously loaded rewarded.
void Dispose()
Disposes this interstitial object and can no longer be used for loading or showing.

Public Events Documentation

event OnPrebiddingFinished

Action< PrebiddingResults > OnPrebiddingFinished()

Notifies when the prebidding call finished, containing a PrebiddingResults object.

event OnLoaded

Action< LoadResult > OnLoaded()

Notifies when the rewarded was loaded successfully, containing a LoadResult object.

event OnFailedToLoad

Action< LoadError, LoadResult > OnFailedToLoad()

Notifies when the rewarded failed to load, containing a LoadError object describing the error and optionally a LoadResult object.

event OnFailedToShow

Action< ShowError > OnFailedToShow()

Notifies when the rewarded failed to show, containing a ShowError object describing the error.

event OnShowed

Action OnShowed()

Notifies when the rewarded was shown.

event OnImpression

Action< ImpressionData > OnImpression()

Notifies when the rewarded impression was recorded, containing an ImpressionData object.

event OnClicked

Action OnClicked()

Notifies when the rewarded was clicked.

event OnDismissed

Action OnDismissed()

Notifies when the rewarded was dismissed.

event OnEarnedReward

Action OnEarnedReward()

Notifies when the user should be granted a reward for watching the ad. This callback won't be called if the user skipped the ad.

Public Functions Documentation

function Create

static Rewarded Create(
    string placementId,
    bool test =false,
    bool verbose =false
)

Creates a new instance of a Rewarded.

Parameters:

  • placementId A string containing a valid placement id.
  • test Whether a test rewarded should be loaded. This is only for testing purposes, should be false on production builds.
  • verbose Enable logging for this rewarded instance. This is only for debugging purposes, should be false on production builds.

Return: A Rewarded instance ready to load.

function Load

void Load(
    CustomProperties customProperties =null
)

Starts a new load call.

Parameters:

  • customProperties A CustomProperties object containing custom properties, useful for tracking.

function IsReady

bool IsReady()

Indicates if the rewarded is ready to show.

Return: true if the rewarded is ready to show, false otherwise.

function Show

void Show()

Shows a previously loaded rewarded.

function Show

void Show(
    string adSpace
)

Shows a previously loaded rewarded.

Parameters:

  • adSpace The space in your app from where the ad will be shown (eg: dashboard, settings). Used for tracking.

function Dispose

void Dispose()

Disposes this interstitial object and can no longer be used for loading or showing.


Updated on 2024-11-07 at 18:31:49 +0000