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) Inquiry PointsInquiry amount of points of a user from Tnk server. Because this method is invoked in async way, you have to define TnkAdEventHandler and assign it to TnkAdPlugin before invocation. Method - void TnkAdPlugin::queryPoint(int handlerId) 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) Purchase Items Use this method to decrease user points managed by Tnk server. Because this method is invoked in async way, you have to define TnkAdEventHandler and assign it to TnkAdPlugin before invocation. Method - void TnkAdPlugin::purchaseItem(int itemCost, const char* itemName, int handleId) Description Decrease user points in Tnk server. This method works asynchronously and delivers return values by invoking onReturnPurchaseItem() method in the EventHandler. Parameters
|