GetLeaderboards
public BackendLeaderboardTableReturnObject GetLeaderboards();
Description
Returns all user leaderboards generated in BACKND Console as a list.
- This method cannot be called via SendQueue.
The list contains the following information:
- Leaderboard name (title)
- Leaderboard uuid (uuid)
- Leaderboard creation date (inDate)
- Leaderboard category (rankType)
- Leaderboard cycle (date)
- Initialization time (initializationTime)
- Group categorization (isDivision)
- Mail reward name (rewardPostTitle)
- Whether to initialize data when initializing the leaderboard (isReset)
- How to sort leaderboard (order)
- Table used in the leaderboard (table)
- Column used in the leaderboard (column)
- Additional fields used in the leaderboard (extraDataColumn)
- Data types of additional fields used in the leaderboard (extraDataType)
BackendLeaderboardTableReturnObject
namespace BackEnd.Leaderboard
{
public class LeaderboardTableItem
{
public string rankType;
public string date;
public bool isDivision;
public string uuid;
public string order;
public bool isReset;
public string title;
public string table;
public string column;
//Exists only for one-time rankings
public string rankStartDateAndTime;
public string rankEndDateAndTime;
//Exists only when there are additional fields
public string extraDataColumn;
public string extraDataType;
public Dictionary<string, string> rewardPostTitle = null;
}
public class BackendLeaderboardTableReturnObject : BackendReturnObject
{
public List<LeaderboardTableItem> GetLeaderboardTableList();
}
}
Example
Synchronous
BackEnd.Leaderboard.BackendLeaderboardTableReturnObject bro = null;
bro = Backend.Leaderboard.Guild.GetLeaderboards();
foreach (BackEnd.Leaderboard.LeaderboardTableItem item in bro.GetLeaderboardTableList())
{
Debug.Log(item.ToString());
}
Asynchronous
Backend.Group.Leaderboard.User.GetLeaderboards(bro =>
{
foreach (BackEnd.Leaderboard.LeaderboardTableItem item in bro.GetLeaderboardTableList())
{
string uuid = item.uuid;
Debug.Log(item.ToString());
}
});
ReturnCase
Success cases
When the lookup is successful
statusCode : 200
message : Success
returnValue : refer to GetReturnValuetoJSON
Error cases
If the leaderboard is missing
StatusCode : 404
ErrorCode : NotFoundException
Message : leaderboard not found, leaderboard cannot be found
GetReturnValuetoJSON
{
"rows": [
{
"rankType": "guild", // Leaderboard type (user / guild)
"isDivision": true, // Group categorization
"rewardInDate": "2024-07-30T04:52:13.448Z",
"order": "desc", // Sorting order
"initializationTime": "04:00:00 UTC+9:00", // Leaderboard initialization time
"rankStartDateAndTime": "2024-08-19T15:40:00.000Z", // (Only for leaderboards that are one-time and not time-limited) Leaderboard start time
"rankEndDateAndTime": "2024-08-20T15:00:00.000Z", // (Only for leaderboards that are one-time) Leaderboard end time
// Ranking period
// day : daily
// week : weekly
// month : monthly
// infinity : accumulative ranking
// custom : one-time ranking
"date": "custom", //
"inDate": "2024-08-20T07:08:09.478Z", // Leaderboard creation date
"uuid": "01916e9d-5186-7594-b8ab-e286cefb6226",
"isReset": true, // Whether to reset data when initializing
// Reward name by language
"rewardPostTitle": {
"ko": "Korean reward",
"en": "EnglishReward",
"fallback": "en"
},
"rewardName": "Reward chart name ",
"title": "Ranking title",
"table": "meta", // meta / goods
"column": "Column name used for the ranking" // Column name set in meta or totalGoods1Amount ~ totalGoods10Amount
},
...
]
}