Achievements

Retrieve achievement list

For this, you need to add a AchievementsModule in Initialisation. Refer Initialize the RGN SDK
RGNCoreBuilder.AddModule(new AchievementsModule());

API call:

AchievementsModule module = RGNCoreBuilder.I.GetModule<AchievementsModule>();
GetAchievementsResponseData responseData = await module.Get();

Response:

Return GetAchievementsResponseData object, which contains following fields:
  • List<RGNAchievementDataV2> achievements - list of achievements correspond current application
Details of RGNAchievementDataV2:
  • achievementId (string) - unique identifier of achievement
  • name (string) - name of achievement
  • description (string) - description of achievement
  • virtualGoodReward (string) - virtual item which will be added to user inventory after achievement trigger, field should equal to virtual item id
  • currencyRewards (List<RGNCurrency>) - currencies which will be added to user after achievement trigger
  • repeatable (bool) - indicates whether the achievement can be completed multiple times

Trigger achievement

In order to complete an achievement, it requires to call the following function by passing achievement's unique id (string) as a parameter.

API call:

AchievementsModule module = RGNCoreBuilder.I.GetModule<AchievementsModule>();
TriggerAchievementResponseData response = await module.Trigger(achievementId);

Response:

Return TriggerAchievementResponseData object, which contains following fields:
  • int status - request error code, if request success equals to 200
  • string message - request error description, if request success equals to "ok"
Copy link
On this page
Retrieve achievement list
Trigger achievement