Server Battle API Reference
Battle session is the foundation of battle service. Battle session instances can be created through services such as Lobby / Matchmaking / World or via the PGOS HTTP API, and placed in online or local DS via the DS Hosting service. The battle session also manages data such as the players in the game and the DS access information.
API List
| API | Description |
|---|---|
| UpdateBattleRecord | Now, there is no need to manually establish the association between battle session id and player ids, as PGOS will automatically complete this task. |
| SetBattleTags | Set tags for a battle session record. |
| UpdateBattleData | Update the data of battle |
| UpdateBattleBrief | Update the brief of battle |
| UpdateBattleDetail | Update the detail of battle. |
| DeleteBattleData | Delete the data of the specified key of battle |
API Details
UpdateBattleRecord
Now, there is no need to manually establish the association between battle session id and player ids, as PGOS will automatically complete this task.
Deprecated, use SetBattleTags instead.
/// <summary>Now, there is no need to manually establish the association between battle session id and player ids, as PGOS will automatically complete this task.</summary>
/// <param name="battle_session_id">The id of battle session.</param>
/// <param name="player_ids">IDs of all players in the battle, array cannot be empty.</param>
/// <param name="tags">The tags of battle.</param>
public void UpdateBattleRecord(string battle_session_id, List<string> player_ids, List<string> tags, BattleDelegate0 callback);
Parameters:
| Param | Type | Description |
|---|---|---|
| battle_session_id | string | The id of battle session. |
| player_ids | List<string> | IDs of all players in the battle, array cannot be empty. |
| tags | List<string> | The tags of battle. |
| callback | BattleDelegate0 |
Return: void
SetBattleTags
Set tags for a battle session record.
/// <summary>Set tags for a battle session record.</summary>
public void SetBattleTags(SetBattleTagsParams pgos_params, BattleDelegate0 callback);
Parameters:
| Param | Type | Description |
|---|---|---|
| pgos_params | SetBattleTagsParams | |
| callback | BattleDelegate0 |
Return: void
UpdateBattleData
Update the data of battle
/// <summary>Update the data of battle</summary>
/// <param name="battle_session_id">The id of battle session.</param>
/// <param name="record_data">The data of battle.</param>
public void UpdateBattleData(string battle_session_id, Dictionary<string, string> record_data, BattleDelegate0 callback);
Parameters:
| Param | Type | Description |
|---|---|---|
| battle_session_id | string | The id of battle session. |
| record_data | Dictionary<string, string> | The data of battle. |
| callback | BattleDelegate0 |
Return: void
UpdateBattleBrief
Update the brief of battle
/// <summary>Update the brief of battle</summary>
/// <param name="battle_session_id">The id of battle session.</param>
/// <param name="brief">The data of battle.</param>
public void UpdateBattleBrief(string battle_session_id, string brief, BattleDelegate0 callback);
Parameters:
| Param | Type | Description |
|---|---|---|
| battle_session_id | string | The id of battle session. |
| brief | string | The data of battle. |
| callback | BattleDelegate0 |
Return: void
UpdateBattleDetail
Update the detail of battle.
/// <summary>Update the detail of battle.</summary>
/// <param name="battle_session_id">The id of battle session.</param>
/// <param name="detail">The data of battle.</param>
public void UpdateBattleDetail(string battle_session_id, string detail, BattleDelegate0 callback);
Parameters:
| Param | Type | Description |
|---|---|---|
| battle_session_id | string | The id of battle session. |
| detail | string | The data of battle. |
| callback | BattleDelegate0 |
Return: void
DeleteBattleData
Delete the data of the specified key of battle
/// <summary>Delete the data of the specified key of battle</summary>
/// <param name="battle_session_id">The id of battle session.</param>
/// <param name="keys">The specified keys to be deleted, if the keys is empty, nothing will happen.</param>
public void DeleteBattleData(string battle_session_id, List<string> keys, BattleDelegate1 callback);
Parameters:
| Param | Type | Description |
|---|---|---|
| battle_session_id | string | The id of battle session. |
| keys | List<string> | The specified keys to be deleted, if the keys is empty, nothing will happen. |
| callback | BattleDelegate1 |
Return: void
All Delegates
public delegate void BattleDelegate0(PgosResult a0);
public delegate void BattleDelegate1(PgosResult a0, DelBattleDataRsp a1);
Type Reference: