Client Goal API Reference
Goal service that allows you to set numerous goals for players and then package these goals into a variety of outer loop features, for example Achievement, Quests, Battle Pass, etc. Games can use the Client SDK to access goal service to retrieve the goals progress and claim rewards for a player.
API List
| API | Description |
|---|---|
| GetGoalsSchedule | Query information of goals schedule and player goals in it |
| BatchGetGoalTiers | Batch query the tiers of a player goal |
| ClaimTierRewards | Cliam rewards for a player goal tier |
| ClaimGoalRewards | Cliam rewards for a player goal |
| ClaimScheduleRewards | Cliam rewards for all player goals in a schedule |
Event List
| Event | Description |
|---|---|
| OnSimpleGoalAchieved | |
| OnHyperGoalAchieved |
API Details
GetGoalsSchedule
Query information of goals schedule and player goals in it
/// <summary>Query information of goals schedule and player goals in it</summary>
/// <param name="schedule_id">Schedules to query</param>
public void GetGoalsSchedule(string schedule_id, GoalDelegate0 callback);
Parameters:
| Param | Type | Description |
|---|---|---|
| schedule_id | string | Schedules to query |
| callback | GoalDelegate0 |
Return: void
BatchGetGoalTiers
Batch query the tiers of a player goal
/// <summary>Batch query the tiers of a player goal</summary>
/// <param name="player_goal_id">Schedules id</param>
/// <param name="order">Order of the first goal to query. Both 0 and 1 will be considered as starting the query from the first tier</param>
/// <param name="count">Count of tiers need to query. The maximum value is 50</param>
public void BatchGetGoalTiers(string player_goal_id, UInt32 order, UInt32 count, GoalDelegate1 callback);
Parameters:
| Param | Type | Description |
|---|---|---|
| player_goal_id | string | Schedules id |
| order | UInt32 | Order of the first goal to query. Both 0 and 1 will be considered as starting the query from the first tier |
| count | UInt32 | Count of tiers need to query. The maximum value is 50 |
| callback | GoalDelegate1 |
Return: void
ClaimTierRewards
Cliam rewards for a player goal tier
/// <summary>Cliam rewards for a player goal tier</summary>
/// <param name="player_goal_id">Player goal id.</param>
/// <param name="tier_id">Tier id of the player goal.</param>
public void ClaimTierRewards(string player_goal_id, string tier_id, GoalDelegate2 callback);
Parameters:
| Param | Type | Description |
|---|---|---|
| player_goal_id | string | Player goal id. |
| tier_id | string | Tier id of the player goal. |
| callback | GoalDelegate2 |
Return: void
ClaimGoalRewards
Cliam rewards for a player goal
/// <summary>Cliam rewards for a player goal</summary>
/// <param name="player_goal_id">Player goal id.</param>
public void ClaimGoalRewards(string player_goal_id, GoalDelegate2 callback);
Parameters:
| Param | Type | Description |
|---|---|---|
| player_goal_id | string | Player goal id. |
| callback | GoalDelegate2 |
Return: void
ClaimScheduleRewards
Cliam rewards for all player goals in a schedule
/// <summary>Cliam rewards for all player goals in a schedule</summary>
/// <param name="schedule_id">Schedules id</param>
public void ClaimScheduleRewards(string schedule_id, GoalDelegate2 callback);
Parameters:
| Param | Type | Description |
|---|---|---|
| schedule_id | string | Schedules id |
| callback | GoalDelegate2 |
Return: void
Event Details
OnSimpleGoalAchieved
/// <summary>
/// </summary>
public event GoalDelegate3 OnSimpleGoalAchieved;
Type Reference:
OnHyperGoalAchieved
/// <summary>
/// </summary>
public event GoalDelegate4 OnHyperGoalAchieved;
Type Reference:
All Delegates
public delegate void GoalDelegate0(PgosResult a0, GoalsSchedule a1);
public delegate void GoalDelegate1(PgosResult a0, GetGoalTiersResult a1);
public delegate void GoalDelegate2(PgosResult a0, ClaimGoalsRewardResult a1);
public delegate void GoalDelegate3(SimpleGoalAchievedEvt a0);
public delegate void GoalDelegate4(HyperGoalAchievedEvt a0);
Type Reference: