Points can be managed by Tnk Server or by your server depending on the 'Point management' setting. When you selected 'Managed by Tnk', all points are managed by Tnk server and you can inquiry and withdraw points of users using APIs described in this chapter. If you selected 'Callback URL', all the point reward events are sent to your server through the callback URL you entered. For callback URL, see 1.6 Callback URL. 1) TnkAd.Plugin - queryPoint()Inquiry amount of points of a user from Tnk server. Because this method is invoked in async way, you have to define EventHandler to get return values. Method - void queryPoint(string handlerName) Description This method returns amount of points of a user managed by Tnk server. This method works asynchronously and delivers return values by invoking onReturnQueryPoint() method in the EventHandler. Parameters
2) TnkAd.Plugin - purchaseItem() Use this method to decrease user points managed by Tnk server. Because this method is invoked in async way, you have to define EventHandler to get return values. Method - void purchaseItem(int pointCost, string itemId, string handlerName) Description Decrease user points in Tnk server. This method works asynchronously and delivers return values by invoking onReturnPurchaseItem() method in the EventHandler. Parameters
|