Tapjoy SDK - C# API
 
Loading...
Searching...
No Matches
TapjoyUnity.TJPlacement Class Reference

Placement. More...

Public Member Functions

void RequestContent ()
 Request a content for the placement.
 
void ShowContent ()
 Shows a content for the placement.
 
bool IsContentAvailable ()
 Whether or not content for this placement has been returned and is ready to be presented.
 
bool IsContentReady ()
 Whether or not the pre-loaded content for this placement has been cached and is ready to be presented.
 
string GetName ()
 Returns the name of this placement.
 
void SetEntryPoint (TJEntryPoint entryPoint)
 Sets the entry point for this placement instance.
 
void SetCurrencyBalance (string currencyId, int balance)
 Sets currency value for given currency ID.
 
int GetCurrencyBalance (string currencyId)
 Gets currency balance for given currency ID.
 
void SetRequiredAmount (string currencyId, int amount)
 Sets currency required amount for given currency ID.
 
int GetRequiredAmount (string currencyId)
 Gets currency required amount for given currency ID.
 
delegate void OnRequestSuccessHandler (TJPlacement placement)
 Delegate to be called when RequestContent() is successful Check whether content is available and ready, using IsContentAvailable and IsContentReady.
 
delegate void OnRequestFailureHandler (TJPlacement placement, string error)
 Delegate to be called when RequestContent fails.
 
delegate void OnContentReadyHandler (TJPlacement placement)
 Delegate to be called when a content for the given placement is ready to show.
 
delegate void OnContentShowHandler (TJPlacement placement)
 Delegate to be called when a content for the given placement is showing.
 
delegate void OnContentDismissHandler (TJPlacement placement)
 Delegate to be called when a content for the given placement is dismissed.
 
delegate void OnClickHandler (TJPlacement placement)
 Delegate to be called when a click event has occurred.
 
delegate void OnPurchaseRequestHandler (TJPlacement placement, TJActionRequest request, string productId)
 Called when a purchase has been requested.
 
delegate void OnRewardRequestHandler (TJPlacement placement, TJActionRequest request, string itemId, int quantity)
 Called when a reward unlock has been requested.
 
delegate void OnSetCurrencyBalanceSuccessHandler (TJPlacement placement)
 Delegate to be called when SetCurrencyBalance is successful.
 
delegate void OnSetCurrencyBalanceFailureHandler (TJPlacement placement, int code, string error)
 Delegate to be called when SetCurrencyBalance fails.
 
delegate void OnSetCurrencyAmountRequiredSuccessHandler (TJPlacement placement)
 Delegate to be called when SetRequiredAmount is successful.
 
delegate void OnSetCurrencyAmountRequiredFailureHandler (TJPlacement placement, int code, string error)
 Delegate to be called when SetRequiredAmount fails.
 

Static Public Member Functions

static TJPlacement CreatePlacement (string placementName)
 Create placement.
 
static void DismissContent ()
 Dismiss content which is showing.
 

Events

static OnRequestSuccessHandler OnRequestSuccess [add, remove]
 Event for OnRequestSuccessHandler.
 
static OnRequestFailureHandler OnRequestFailure [add, remove]
 Event for OnRequestFailureHandler.
 
static OnContentReadyHandler OnContentReady [add, remove]
 Event for OnContentReadyHandler.
 
static OnContentShowHandler OnContentShow [add, remove]
 Event for OnContentShowHandler.
 
static OnContentDismissHandler OnContentDismiss [add, remove]
 Event for OnContentDismissHandler.
 
static OnClickHandler OnClick [add, remove]
 Event for OnClickHandler.
 
static OnPurchaseRequestHandler OnPurchaseRequest [add, remove]
 Event for OnPurchaseRequestHandler.
 
static OnRewardRequestHandler OnRewardRequest [add, remove]
 Event for OnRewardRequestHandler.
 
static OnSetCurrencyBalanceSuccessHandler OnSetCurrencyBalanceSuccess [add, remove]
 Event for OnSetCurrencyBalanceSuccessHandler.
 
static OnSetCurrencyBalanceFailureHandler OnSetCurrencyBalanceFailure [add, remove]
 Event for OnSetCurrencyBalanceFailureHandler.
 
static OnSetCurrencyAmountRequiredSuccessHandler OnSetCurrencyAmountRequiredSuccess [add, remove]
 Event for OnSetCurrencyAmountRequiredSuccessHandler.
 
static OnSetCurrencyAmountRequiredFailureHandler OnSetCurrencyAmountRequiredFailure [add, remove]
 Event for OnSetCurrencyAmountRequiredFailureHandler.
 

Detailed Description

Placement.

Member Function Documentation

◆ GetCurrencyBalance()

int TapjoyUnity.TJPlacement.GetCurrencyBalance ( string currencyId)
inline

Gets currency balance for given currency ID.

Parameters
currencyIdcurrency id
Returns
balance amount

◆ GetName()

string TapjoyUnity.TJPlacement.GetName ( )
inline

Returns the name of this placement.

This is the same name passed to the constructor when creating this TapjoyUnity.TJPlacement object.

Returns
the name for this placement

◆ GetRequiredAmount()

int TapjoyUnity.TJPlacement.GetRequiredAmount ( string currencyId)
inline

Gets currency required amount for given currency ID.

Parameters
currencyIdcurrency id
Returns
required amount

◆ IsContentAvailable()

bool TapjoyUnity.TJPlacement.IsContentAvailable ( )
inline

Whether or not content for this placement has been returned and is ready to be presented.

Returns
if content is available and has a fill

◆ IsContentReady()

bool TapjoyUnity.TJPlacement.IsContentReady ( )
inline

Whether or not the pre-loaded content for this placement has been cached and is ready to be presented.

Returns
if pre-loaded content is ready to be presented for this placement

◆ OnClickHandler()

delegate void TapjoyUnity.TJPlacement.OnClickHandler ( TJPlacement placement)

Delegate to be called when a click event has occurred.

Deprecated
Deprecated since version 14.2.0
Parameters
placementthe placement that was requested

◆ OnContentDismissHandler()

delegate void TapjoyUnity.TJPlacement.OnContentDismissHandler ( TJPlacement placement)

Delegate to be called when a content for the given placement is dismissed.

Parameters
placementthe placement that was requested

◆ OnContentReadyHandler()

delegate void TapjoyUnity.TJPlacement.OnContentReadyHandler ( TJPlacement placement)

Delegate to be called when a content for the given placement is ready to show.

Parameters
placementthe placement that was requested

◆ OnContentShowHandler()

delegate void TapjoyUnity.TJPlacement.OnContentShowHandler ( TJPlacement placement)

Delegate to be called when a content for the given placement is showing.

Parameters
placementthe placement that was requested

◆ OnPurchaseRequestHandler()

delegate void TapjoyUnity.TJPlacement.OnPurchaseRequestHandler ( TJPlacement placement,
TJActionRequest request,
string productId )

Called when a purchase has been requested.

Parameters
placementthe placement that was requested
requestThe request
Use TapjoyUnity.TJActionRequest requestID to get the identifier of the campaign which make this request
productIdthe product identifier (SKU) of the in-app item to purchase

◆ OnRequestFailureHandler()

delegate void TapjoyUnity.TJPlacement.OnRequestFailureHandler ( TJPlacement placement,
string error )

Delegate to be called when RequestContent fails.

Parameters
placementthe placement that was requested
errorthe error message

◆ OnRequestSuccessHandler()

delegate void TapjoyUnity.TJPlacement.OnRequestSuccessHandler ( TJPlacement placement)

Delegate to be called when RequestContent() is successful Check whether content is available and ready, using IsContentAvailable and IsContentReady.

Parameters
placementthe placement that was requested

◆ OnRewardRequestHandler()

delegate void TapjoyUnity.TJPlacement.OnRewardRequestHandler ( TJPlacement placement,
TJActionRequest request,
string itemId,
int quantity )

Called when a reward unlock has been requested.

Parameters
placementthe placement that was requested
requestThe request
Use TapjoyUnity.TJActionRequest requestID to get the unique identifier of this reward to prevent the reuse attack
Use TapjoyUnity.TJActionRequest token to verify this reward request
itemIdthe name of the rewarded item
quantitythe quantity of the rewarded item

◆ OnSetCurrencyAmountRequiredFailureHandler()

delegate void TapjoyUnity.TJPlacement.OnSetCurrencyAmountRequiredFailureHandler ( TJPlacement placement,
int code,
string error )

Delegate to be called when SetRequiredAmount fails.

Parameters
placementthe placement that was requested
codethe error code
errorthe error message

◆ OnSetCurrencyAmountRequiredSuccessHandler()

delegate void TapjoyUnity.TJPlacement.OnSetCurrencyAmountRequiredSuccessHandler ( TJPlacement placement)

Delegate to be called when SetRequiredAmount is successful.

Parameters
placementthe placement that was requested

◆ OnSetCurrencyBalanceFailureHandler()

delegate void TapjoyUnity.TJPlacement.OnSetCurrencyBalanceFailureHandler ( TJPlacement placement,
int code,
string error )

Delegate to be called when SetCurrencyBalance fails.

Parameters
placementthe placement that was requested
codethe error code
errorthe error message

◆ OnSetCurrencyBalanceSuccessHandler()

delegate void TapjoyUnity.TJPlacement.OnSetCurrencyBalanceSuccessHandler ( TJPlacement placement)

Delegate to be called when SetCurrencyBalance is successful.

Parameters
placementthe placement that was requested

◆ RequestContent()

void TapjoyUnity.TJPlacement.RequestContent ( )
inline

Request a content for the placement.

This method should be called after SDK is connected.

◆ SetCurrencyBalance()

void TapjoyUnity.TJPlacement.SetCurrencyBalance ( string currencyId,
int balance )
inline

Sets currency value for given currency ID.

Parameters
currencyIdcurrency id
balancebalance amount

◆ SetEntryPoint()

void TapjoyUnity.TJPlacement.SetEntryPoint ( TJEntryPoint entryPoint)
inline

Sets the entry point for this placement instance.

Parameters
entryPointthe entry point to set.

◆ SetRequiredAmount()

void TapjoyUnity.TJPlacement.SetRequiredAmount ( string currencyId,
int amount )
inline

Sets currency required amount for given currency ID.

Parameters
currencyIdcurrency id
amountrequired amount

Event Documentation

◆ OnClick

OnClickHandler TapjoyUnity.TJPlacement.OnClick
staticaddremove

Event for OnClickHandler.

Deprecated
Deprecated since version 14.2.0

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