Query Previous Season Record
API for querying a specific player's leaderboard record from a previous season.
URL Verification
This API uses the service-api.playnanoo.com domain.
API Information
- URL:
https://service-api.playnanoo.com/leaderboard/v20240301/show/prev - Method:
PUT - Authentication Required: Yes
DeviceInfo Inheritance
The Req class of this API inherits from DeviceInfo. All properties of DeviceInfo are automatically included.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| uid | string | Required | Table code |
| record_id | string | Required | Record ID (player identifier) |
| rotation_count | int | Required | Season number (previous season to query) |
Response Data
Res Class
| Field | Type | Description |
|---|---|---|
| Rank | int | Player's rank |
| RotationCount | int | Season number |
| RecordId | string | Record ID |
| Score | int | Score |
| ExtraData | string | Additional data (JSON string) |
Unity C# Implementation
BaseResponse Class
Base class for all API responses.
public class BaseResponse
{
public string ErrorCode;
public string Message;
public string WithdrawalKey;
public string BlockKey;
}
Field descriptions:
ErrorCode: Error codeMessage: Error messageWithdrawalKey: Key required for recovery if in withdrawal grace period (only provided for accounts in withdrawal grace period)BlockKey: Key provided if account is blocked (only provided for blocked accounts)
Query Previous Season Record Class
using System;
using System.Collections;
using UnityEngine.Networking;
public class PlayerShowPrev
{
static string path = "https://service-api.playnanoo.com/leaderboard/v20240301/show/prev";
[Serializable]
public class Req : DeviceInfo
{
public string uid;
public string record_id;
public int rotation_count;
public IEnumerator Send(string table_code, string recordId, int rotaionCount, Action<Res> onSuccess, Action<BaseResponse> onError)
{
if (!string.IsNullOrEmpty(table_code)) this.uid = table_code;
if (!string.IsNullOrEmpty(recordId)) this.record_id = recordId;
this.rotation_count = rotaionCount;
yield return HttpClient.Send<Req, Res>(
UnityWebRequest.kHttpVerbPUT,
path,
requireToken: true,
body: this,
onSuccess: onSuccess,
onError: onError
);
}
}
[Serializable]
public class Res : BaseResponse
{
public int Rank;
public int RotationCount;
public string RecordId;
public int Score;
public string ExtraData;
}
}
Usage Example
public void ShowPreviousSeasonRecord()
{
PlayerShowPrev.Req req = new PlayerShowPrev.Req();
StartCoroutine(req.Send(
table_code: "my_leaderboard_table",
recordId: "player_001",
rotaionCount: 1, // Previous season number
onSuccess: res =>
{
Debug.Log("Previous season record retrieved successfully");
Debug.Log($"Rank: {res.Rank}");
Debug.Log($"Score: {res.Score}");
Debug.Log($"Season: {res.RotationCount}");
// Parse ExtraData if present
if (!string.IsNullOrEmpty(res.ExtraData))
{
Debug.Log($"Additional data: {res.ExtraData}");
}
},
onError: error =>
{
Debug.LogError($"Previous season record retrieval failed: [{error.ErrorCode}] {error.Message}");
}
));
}
Previous Season Query
You can specify a particular previous season using rotation_count. rotation_count=1 refers to the immediately previous season.
Season Records
Previous season records are read-only and cannot be modified. After a season ends, that season's data is archived.