Skip to main content

Delete Table

API for deleting a leaderboard table.

URL Verification

This API uses the service-api.playnanoo.com domain.

API Information

  • URL: https://service-api.playnanoo.com/leaderboard/v20240301/table/delete
  • 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

ParameterTypeRequiredDescription
uidstringRequiredTable code

Response Data

Res Class

FieldTypeDescription
StatusstringProcessing 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 code
  • Message: Error message
  • WithdrawalKey: 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)

Delete Table Class

using System;
using System.Collections;
using UnityEngine.Networking;

public class TableDelete
{
static string path = "https://service-api.playnanoo.com/leaderboard/v20240301/table/delete";

[Serializable]
public class Req : DeviceInfo
{
public string uid;

public IEnumerator Send(string table_code, Action<Res> onSuccess, Action<BaseResponse> onError)
{
if (!string.IsNullOrEmpty(table_code)) this.uid = table_code;

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 DeleteLeaderboardTable()
{
TableDelete.Req req = new TableDelete.Req();

StartCoroutine(req.Send(
table_code: "my_leaderboard_table",
onSuccess: res =>
{
Debug.Log("Table deleted successfully");
Debug.Log($"Status: {res.Status}");
},
onError: error =>
{
Debug.LogError($"Table deletion failed: [{error.ErrorCode}] {error.Message}");
}
));
}
Deletion Caution

Deleting a table will also delete all records in that table and cannot be recovered. Please verify before deletion.

Data Loss

Table deletion is an irreversible operation. All players' scores and ranking data will be permanently deleted.