Query Player
Queries player information recorded on the leaderboard.
Call Information
public void Show (string tableCode, string recordId, PlayNANOODelegate callback){}
// Query past cycle of player ranking information
public void ShowPrev (string uid, int rotationCount, string recordId, PlayNANOODelegate callback){}
Call Information Details
Parameter | Description | Type |
---|---|---|
tableCode | Table Code | string |
recordId | Record ID (e.g. Player ID) | string |
rotationCount | Cycle count | integer |
callback | Communication result | PlayNANOODelegate |
Source Code
using PlayNANOO;
public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;
void Awake()
{
plugin = Plugin.GetInstance();
string tableCode = "TableCode";
string recordId = "UserId";
plugin.LeaderboardManagerV20240301.Show(tableCode, recordId, (status, errorCode, jsonString, values) => {
if (status.Equals(Configure.PN_API_STATE_SUCCESS))
{
Debug.Log("Success");
Debug.Log(values["Rank"]);
Debug.Log(values["RotationCount"]);
Debug.Log(values["RecordId"]);
Debug.Log(values["Score"]);
Debug.Log(values["ExtraData"]);
}
else
{
Debug.Log("Fail");
}
});
// Query past cycle of player ranking information
int rotationCount = 1;
plugin.LeaderboardManagerV20240301.ShowPrev(tableCode, rotationCount, recordId, (status, errorCode, jsonString, values) => {
if (status.Equals(Configure.PN_API_STATE_SUCCESS))
{
Debug.Log("Success");
Debug.Log(values["Rank"]);
Debug.Log(values["RotationCount"]);
Debug.Log(values["RecordId"]);
Debug.Log(values["Score"]);
Debug.Log(values["ExtraData"]);
}
else
{
Debug.Log("Fail");
}
});
}
}
Communication Result
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"Rank": 1,
"RotationCount": 1,
"RecordId": "string",
"Score": 100,
"ExtraData": "string"
}
Communication Result
Data Key | Description | Type |
---|---|---|
Rank | Rank | integer |
RotationCount | Leaderboard table cycle | integer |
RecordId | Record ID | string |
Score | Score | integer |
ExtraData | Additional data | string |