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
Streaks Read more about the Streak system in Hiro here .
Listing streaks
# You can list the current streaks for the user:
1
2
const streaksList = hiroClient . streaksList ( session );
console . log ( streaksList );
Claiming Streaks Rewards
# Players can claim streak rewards using the streaksClaim method, passing the streak IDs.
1
2
3
4
5
6
7
const request = new StreaksClaimRequest ();
request . ids = {
"daily_login"
};
const streaksList = hiroClient . streaksClaim ( session , request );
console . log ( streaksList );
Resetting Streaks
# To reset specific streaks for a player, use the streaksReset method:
1
2
3
4
5
6
7
const request = new StreaksResetRequest ();
request . ids = {
"daily_login"
};
const streaksList = hiroClient . streaksReset ( session , request );
console . log ( streaksList );
Updating Streaks
# You can manually update streaks for a player by passing a dictionary of streak names and new values:
1
2
3
4
5
6
7
const request = new StreaksUpdateRequest ();
request . ids = {
"daily_login" : "1"
};
const streaksList = hiroClient . streaksUpdate ( session , request );
console . log ( streaksList );