플레이어 조회
리더보드에 기록 된 플레이어 정보를 조회 합니다.
호출 정보
public void Show (string tableCode, string recordId, PlayNANOODelegate callback){}
// 지난 회차 플레이어 랭킹 정보 조회
public void ShowPrev (string uid, int rotationCount, string recordId, PlayNANOODelegate callback){}
호출 상세 정보
파라미터 | 설명 | 타입 |
---|---|---|
tableCode | 테이블 코드 | string |
recordId | 기록 아이디 (예. 플레이어 아이디) | string |
rotationCount | 갱신 회차 | integer |
callback | 통신 결과 | PlayNANOODelegate |
소스 코드
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");
}
});
// 지난 회차 플레이어 랭킹 정보 조회
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");
}
});
}
}
통신 결과
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"Rank": 1,
"RotationCount": 1,
"RecordId": "string",
"Score": 100,
"ExtraData": "string"
}
통신 결과 상세 정보
데이터키 | 설명 | 타입 |
---|---|---|
Rank | 랭킹 | integer |
RotationCount | 리더보드 테이블 회차 | integer |
RecordId | 기록 아이디 | string |
Score | 점수 | integer |
ExtraData | 추가 데이터 | string |