Client
.NET/Unity C++/Unreal/Cocos2d-x JavaScript/Cocos2d-js Godot 3 Godot 4 Java/Android Defold cURL REST Swift Dart/Flutter
Server
TypeScript Go Lua
Rewarded Video
# Listing available placements
# You can list available placements.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
foreach ( var placement in economySystem . Placements )
{
Debug . Log ( $"Placement {placement.Id}. Rewards:" );
foreach ( var currency in placement . Reward . Currencies )
{
Debug . Log ( $"{currency.Key}: {currency.Value}" );
}
foreach ( var energy in placement . Reward . Energies )
{
Debug . Log ( $"{energy.Key}: {energy.Value}" );
}
}
Starting a placement
# You can start a placement for the user.
1
2
var placementStatus = await economySystem . PlacementStartAsync ( "<placementId1>" );
Debug . Log ( $"Placement {placementStatus.PlacementId} created at {placementStatus.CreateTime}" );
Getting a placement status
# You can get the status for a placement.
1
2
var attemptCount = 1 ;
var placementStatus = await economySystem . PlacementStatusAsync ( "<placementId1>" , "<rewardId1>" , attemptCount );
You can optionally poll for a placement status instead.
1
2
3
uint attempts = 5 u ;
uint interval = 5000 u ;
economySystem . PollPlacementStatusAsync ( "<placementId1>" , "<rewardId1>" , attempts , interval );