Edit Previous Season Record
API for modifying additional data of a previous season leaderboard record.
URL Verification
This API uses the service-api.playnanoo.com domain.
API Information
- URL:
https://service-api.playnanoo.com/leaderboard/v20240301/edit/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) |
| extra_data | string | Required | Additional data (JSON string) |
| rotation_count | int | Required | Season number (previous season to query) |
Response Data
Res Class
| Field | Type | Description |
|---|---|---|
| Status | string | Processing status |
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)
Edit Previous Season Record Class
using System;
using System.Collections;
using UnityEngine.Networking;
public class PlayerEditPrev
{
static string path = "https://service-api.playnanoo.com/leaderboard/v20240301/edit/prev";
[Serializable]
public class Req : DeviceInfo
{
public string uid;
public string record_id;
public string extra_data;
public int rotation_count;
public IEnumerator Send(string table_code, string recordId, string extraData, 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;
if (!string.IsNullOrEmpty(extraData)) this.extra_data = extraData;
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 string Status;
}
}
Usage Example
public void EditPreviousSeasonData()
{
PlayerEditPrev.Req req = new PlayerEditPrev.Req();
// Serialize additional data to JSON
var extraData = new
{
season = 1,
reward_claimed = true,
notes = "Season 1 rewards collected"
};
string jsonExtra = JsonUtility.ToJson(extraData);
StartCoroutine(req.Send(
table_code: "my_leaderboard_table",
recordId: "player_001",
extraData: jsonExtra,
rotaionCount: 1, // Previous season number
onSuccess: res =>
{
Debug.Log("Previous season additional data updated successfully");
Debug.Log($"Status: {res.Status}");
},
onError: error =>
{
Debug.LogError($"Previous season additional data update failed: [{error.ErrorCode}] {error.Message}");
}
));
}
Previous Season Editing
This API modifies only the extra_data of previous seasons without changing the score. You can specify a particular season using rotation_count.
Season Number
rotation_count represents previous seasons based on the current season. For example, rotation_count=1 means the immediately previous season.