Skip to main content

Edit Player Data

Edits additional data of player recorded on the leaderboard.

Call Information

public void Edit (string tableCode, string recordId, string extraData, PlayNANOODelegate callback){}

// Edit player's additional data of past cycle
public void EditPrev (string uid, string recordId, int rotationCount, string extraData, PlayNANOODelegate callback){}

Call Information Details

ParameterDescriptionType
tableCodeTable Codestring
recordIdRecord ID (e.g. Player ID)string
extraDataAdditional datastring
callbackCommunication resultPlayNANOODelegate

Source Code

using PlayNANOO;

public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;

void Awake()
{
plugin = Plugin.GetInstance();

string tableCode = "TableCode";
string recordId = "UserId";
string extraData = "Data";

plugin.LeaderboardManagerV20240301.Edit(tableCode, recordId, extraData, (status, errorCode, jsonString, values) => {
if (status.Equals(Configure.PN_API_STATE_SUCCESS))
{
Debug.Log("Success");
}
else
{
Debug.Log("Fail");
}
});

// Edit player's additional data of past cycle
int rotationCount = 1;

plugin.LeaderboardManagerV20240301.EditPrev(tableCode, recordId, rotationCount, extraData, (status, errorCode, jsonString, values) => {
if (status.Equals(Configure.PN_API_STATE_SUCCESS))
{
Debug.Log("Success");
}
else
{
Debug.Log("Fail");
}
});
}
}

Communication Result

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"Status": "success"
}

Communication Result

Data KeyDescriptionType
StatusOperation resultstring