查询表
查询排行榜表信息。
调用信息
public void TableShow (string tableCode, PlayNANOODelegate callback) {}
调用详细信息
| 参数 | 说明 | 类型 |
|---|---|---|
| tableCode | 表代码 | string |
| callback | 通信结果 | PlayNANOODelegate |
源代码
using PlayNANOO;
public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;
void Awake()
{
plugin = Plugin.GetInstance();
plugin.LeaderboardManagerV20240301.TableShow(tableCode, (status, errorCode, jsonString, values) => {
if (status.Equals(Configure.PN_API_STATE_SUCCESS))
{
Debug.Log("Success");
Debug.Log(values["Rotation"]);
Debug.Log(values["RotationCount"]);
Debug.Log(values["RotationTimeLeft"]);
Debug.Log(values["RecordType"]);
Debug.Log(values["RecordSortType"]);
Debug.Log(values["TotalIds"]);
}
else
{
Debug.Log("Fail");
}
});
}
}
通信结果
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"Rotation": "string",
"RotationCount": 0,
"RotationTimeLeft": 0,
"RecordType": "string",
"RecordSortType": "string",
"TotalIds": 0
}
通信结果详细信息
| 数据键 | 说明 | 类型 |
|---|---|---|
| Rotation | 排行榜类型 | string |
| RotationCount | 排行榜轮次 | integer |
| RotationTimeLeft | 排行榜距下一轮次剩余时间 | integer |
| RecordType | 排行榜记录方式 | string |
| RecordSortType | 排行榜排序方式 | string |
| TotalIds | 排行榜中已记录的总玩家数 | double |