Tapjoy SDK - C# API
TapjoyUnity.TJPlacement Class Reference

Placement. More...

Public Member Functions

void RequestContent ()
 Request a content for the placement. More...
 
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. More...
 
bool IsContentReady ()
 Whether or not the pre-loaded content for this placement has been cached and is ready to be presented. More...
 
string GetName ()
 Returns the name of this placement. More...
 
delegate void OnRequestSuccessHandler (TJPlacement placement)
 Delegate to be called when RequestContent() is successful Check whether content is available and ready, using IsContentAvailable and IsContentReady. More...
 
delegate void OnRequestFailureHandler (TJPlacement placement, string error)
 Delegate to be called when RequestContent fails. More...
 
delegate void OnContentReadyHandler (TJPlacement placement)
 Delegate to be called when a content for the given placement is ready to show. More...
 
delegate void OnContentShowHandler (TJPlacement placement)
 Delegate to be called when a content for the given placement is showing. More...
 
delegate void OnContentDismissHandler (TJPlacement placement)
 Delegate to be called when a content for the given placement is dismissed. More...
 
delegate void OnClickHandler (TJPlacement placement)
 Delegate to be called when a click event has occurred. More...
 
delegate void OnPurchaseRequestHandler (TJPlacement placement, TJActionRequest request, string productId)
 Called when a purchase has been requested. More...
 
delegate void OnRewardRequestHandler (TJPlacement placement, TJActionRequest request, string itemId, int quantity)
 Called when a reward unlock has been requested. More...
 
delegate void OnVideoStartHandler (TJPlacement placement)
 Delegate to be called when a video starts playing.
 
delegate void OnVideoErrorHandler (TJPlacement placement, string errorMessage)
 Delegate to be called when a video related error occurs. More...
 
delegate void OnVideoCompleteHandler (TJPlacement placement)
 Delegate to be called when a video has completed playing.
 

Static Public Member Functions

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

Properties

static OnRequestSuccessHandler OnRequestSuccess
 Event for OnRequestSuccessHandler.
 
static OnRequestFailureHandler OnRequestFailure
 Event for OnRequestFailureHandler.
 
static OnContentReadyHandler OnContentReady
 Event for OnContentReadyHandler.
 
static OnContentShowHandler OnContentShow
 Event for OnContentShowHandler.
 
static OnContentDismissHandler OnContentDismiss
 Event for OnContentDismissHandler.
 
static OnClickHandler OnClick
 Event for OnClickHandler.
 
static OnPurchaseRequestHandler OnPurchaseRequest
 Event for OnPurchaseRequestHandler.
 
static OnRewardRequestHandler OnRewardRequest
 Event for OnRewardRequestHandler.
 
static OnVideoStartHandler OnVideoStart
 Event for OnVideoStartHandler.
 
static OnVideoErrorHandler OnVideoError
 Event for OnVideoErrorHandler.
 
static OnVideoCompleteHandler OnVideoComplete
 Event for OnVideoCompleteHandler.
 

Detailed Description

Placement.

Member Function Documentation

◆ 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

◆ 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.

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

◆ OnVideoErrorHandler()

delegate void TapjoyUnity.TJPlacement.OnVideoErrorHandler ( TJPlacement  placement,
string  errorMessage 
)

Delegate to be called when a video related error occurs.

Parameters
errorMessageError message

◆ RequestContent()

void TapjoyUnity.TJPlacement.RequestContent ( )
inline

Request a content for the placement.

This method should be called after SDK is connected.


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