Skip to main content
Version: 5.11.8

GetPastRankList

public BackendReturnObject GetPastRankList(string rankUuid, int limit = 10, int offset = 0)

Parameters

ValueTypeDescriptionDefault
rankUuidstringuuid of the ranking to look up-
limitintNumber of ranking guilds to load ( 1 - 100)10
offsetintuuid of the ranking to look up (above 0)0

Description

Loads the last ranking list before the renewal of the ranking that has been measured for ranking rewards.

  • This is only possible for rankings with rewards.
  • Only the past rankings for guilds who have received ranking rewards are displayed.
    • If ranking rewards are given to the top 10, past rankings from 11th place and below cannot be loaded.
    • Guilds that are not on the ranking list but have received the reward for all are not included in the past rankings.
  • You cannot load the past rankings for a certain guild or for yourself.
  • Among the past rankings, the single latest past ranking will be loaded.
    • For daily rankings, the past rankings for the previous day will be loaded, and the rankings for 2 days prior cannot be loaded.
  • If a number smaller than 0 is entered for the limit, it will be adjusted to 1. If a number exceeding 100 is entered, it will be adjusted to 100.
  • If a number smaller than 0 is entered for the offset, it will be adjusted to 0.
For withdrawn guilds

If there are withdrawn guilds in the past ranking list, the guild's guildInDate and guildName columns will not exist.
Check the columns using jsonData.ContainsKey("guildName") before processing the data.

Withdrawn guild

{"score":"7835","rank":1}

General guild

{"score":"7834","rank":2,"guildInDate":"2024-03-06T05:59:54.716Z","guildName":"Knights"}

Example

Synchronous


// Rankings 1 to 10
Backend.URank.Guild.GetPastRankList("a61c6980-db5f-11ee-95a9-73cbb1225013", 10, 0);

// Rank 11 (offset + 1) to 111 ((offset + 1 + limit)
Backend.URank.Guild.GetPastRankList("a61c6980-db5f-11ee-95a9-73cbb1225013", 100, 10);

Asynchronous

Backend.URank.Guild.GetPastRankList("a61c6980-db5f-11ee-95a9-73cbb1225013", 10, 0, callback => {

});

SendQueue

SendQueue(Backend.URank.Guild.GetPastRankList, "a61c6980-db5f-11ee-95a9-73cbb1225013", 10, 0, callback => {

});

ReturnCase

Success case

When the lookup is successful
statusCode : 200

returnValue : refer to GetReturnValuetoJSON

Error cases

If reward calculation has not been conducted for the past rankings
statusCode : 200

returnValue : {"rows":[]}

When the uuid is null or string.Empty
statusCode : 400
errorCode : ValidationException

When there is an attempt to look up with a non-existent uuid
statusCode : 404
errorCode : NotFoundException

When attempting to look up the past rankings for the cumulative rankings
statusCode : 428
errorCode : Precondition Required

GetReturnValuetoJSON

{
"rows": [
{
"score": "7835", // The nickname and inDate will not be printed for withdrawn guilds.
"rank": 1
}
{
"score": "5834",
"rank": 2,
"guildName": "Guild2",
"guildInDate": "2024-03-06T05:59:53.523Z"
},
{
"score": "5121",
"rank": 3,
"guildName": "Guild3",
"guildInDate": "2024-03-06T05:59:51.568Z"
}
]
}

Sample code

public void GetRankRewardList()
{
string rankingUUID = "a61c6980-db5f-11ee-95a9-73cbb1225013";

var bro = Backend.URank.Guild.GetPastRankList(rankingUUID, 100, 0);

if(bro.IsSuccess() == false) {
Debug.LogError("GetPastRankList : " + bro);
}

foreach(LitJson.JsonData jsonData in bro.Rows()) {

// If the guild has withdrawn, the nickname and inDate columns do not exist.
string guildName = jsonData.ContainsKey("guildName") ? jsonData["guildName"].ToString() : "Deleted Guild";
string guildInDate = jsonData.ContainsKey("guildInDate") ? jsonData["guildInDate"].ToString() : string.Empty;
string score = jsonData["score"].ToString();
string rank = jsonData["rank"].ToString();

Debug.Log($"{rank}.{guildName}({guildInDate}) : {score} points");
}
}