Skip to main content
Version: 5.18.17

GetMatchList

public BackendReturnObject GetMatchList();

Description​

Look up the information of matching cards created in BACKND Console.
inDate, name, and type of the match, as well as all established time values are returned.

Example​

Synchronous​

Backend.Match.GetMatchList();

Asynchronous​

Backend.Match.GetMatchList(callback => {
// Post-process
});

SendQueue​

SendQueue.Enqueue(Backend.Match.GetMatchList, callback => {
// Post-process
});

Return cases​

Success cases​

When the lookup is successful
statusCode : 200

returnValue : refer to GetReturnValuetoJSON

GetReturnValuetoJSON​

{ 
rows:
[
{
inDate: {"S" : "2020-08-04T09:24:14.807Z"},
matchTitle : {"S", "Match title"},
enable_sandbox : {"BOOL" : false}
matchType : {"S" : "mmr"},
matchModeType : {"S" : "OneOnOne"},
matchHeadCount : {"N" : "2"},
enable_battle_royale : {"BOOL" : false},
match_timeout_m : {"N" : "60"},
transit_to_sandbox_timeout_ms : {"N" : "10000"},
match_start_waiting_time_s : {"N" : "15"}
match_increment_time_s : {"N" : "10"},
maxMatchRange : {"N" : "5000"},
increaseAndDecrease : {"N" : "1000"},
initializeCycle : {"S" : "week"},
defaultPoint : {"N" : "1000"},
savingPoint :
// Example increase/decrease values of 1:1 and team battle score
{"M":{"defeat":{"N":"-5"},"victory":{"N":"5"},"draw":{"N":"0"}}}
// Example increase/decrease values of solo battle
{"L":[{"M":{"1":{"S":"1"}}},{"M":{"2":{"S":"1"}}},{"M":{"3":{"S":"1"}}},{"M":{"4":{"S":"1"}}}]}
},
{
inDate: [object], // Key value of matching card
matchTitle : [object], // Match name set in console
enable_sandbox : [object], // Sandbox mode activation status
matchType : [object], // Match type
matchModeType : [object], // Match mode type
matchHeadCount : [object], // Number of players
enable_battle_royale : [object], //(optional. Solo battle) Battle Royale mode activation status
match_timeout_m : [object], // Maximum duration of game room
transit_to_sandbox_timeout_ms : [object], // Time required to switch to sandbox mode if the sandbox mode is activated
match_start_waiting_time_s : [object], // Time required for the game start message to be returned after all users have entered the game room
match_increment_time_s : [object], //(optional. point, MMR) Standard time to extend the matching range when matching fails
maxMatchRange : [object], //(optional. point, MMR) Maximum matching range
increaseAndDecrease : [object], //(optional. point, MMR) Maximum increase range of matching range
initializeCycle : [object], // Battle history/score reset cycle
defaultPoint : [object], //(optional. point) The first start point
savingPoint : [object] //(optional point, MMR) Point increase/decrease value for winning/losing/reaching a certain rank
}
],
}

Sample code​

public class MatchCard
{
public string inDate;
public string matchTitle;
public bool enable_sandbox;
public string matchType;
public string matchModeType;
public int matchHeadCount;
public bool enable_battle_royale;
public int match_timeout_m;
public int transit_to_sandbox_timeout_ms;
public int match_start_waiting_time_s;
public int match_increment_time_s;
public int maxMatchRange;
public int increaseAndDecrease;
public string initializeCycle;
public int defaultPoint;
public int version;
public string result_processing_type;
public Dictionary<string, int> savingPoint = new Dictionary<string, int>(); // The key value may change for team battle/solo battle.
public override string ToString()
{
string savingPointString = "savingPont : \n";
foreach(var dic in savingPoint)
{
savingPointString += $"{dic.Key} : {dic.Value}\n";
}
savingPointString += "\n";
return $"inDate : {inDate}\n" +
$"matchTitle : {matchTitle}\n" +
$"enable_sandbox : {enable_sandbox}\n" +
$"matchType : {matchType}\n" +
$"matchModeType : {matchModeType}\n" +
$"matchHeadCount : {matchHeadCount}\n" +
$"enable_battle_royale : {enable_battle_royale}\n" +
$"match_timeout_m : {match_timeout_m}\n" +
$"transit_to_sandbox_timeout_ms : {transit_to_sandbox_timeout_ms}\n" +
$"match_start_waiting_time_s : {match_start_waiting_time_s}\n" +
$"match_increment_time_s : {match_increment_time_s}\n" +
$"maxMatchRange : {maxMatchRange}\n" +
$"increaseAndDecrease : {increaseAndDecrease}\n" +
$"initializeCycle : {initializeCycle}\n" +
$"defaultPoint : {defaultPoint}\n" +
$"version : {version}\n" +
$"result_processing_type : {result_processing_type}\n" +
savingPointString;
}
}
public void GetMatchList()
{
var callback = Backend.Match.GetMatchList();

if(!callback.IsSuccess())
{
Debug.LogError("Backend.Match.GetMatchList Error : " + callback);
return;
}

List<MatchCard> matchCardList = new List<MatchCard>();

LitJson.JsonData matchCardListJson = callback.FlattenRows();

Debug.Log("Backend.Match.GetMatchList : " + callback);

for(int i = 0; i < matchCardListJson.Count; i++)
{
MatchCard matchCard = new MatchCard();

matchCard.inDate = matchCardListJson[i]["inDate"].ToString();
matchCard.result_processing_type = matchCardListJson[i]["result_processing_type"].ToString();
matchCard.version = int.Parse(matchCardListJson[i]["version"].ToString());
matchCard.matchTitle = matchCardListJson[i]["matchTitle"].ToString();
matchCard.enable_sandbox = matchCardListJson[i]["enable_sandbox"].ToString() == "true" ? true : false;
matchCard.matchType = matchCardListJson[i]["matchType"].ToString();
matchCard.matchModeType = matchCardListJson[i]["matchModeType"].ToString();
matchCard.matchHeadCount = int.Parse(matchCardListJson[i]["matchHeadCount"].ToString());
matchCard.enable_battle_royale = matchCardListJson[i]["enable_battle_royale"].ToString() == "true" ? true : false;
matchCard.match_timeout_m = int.Parse(matchCardListJson[i]["match_timeout_m"].ToString());
matchCard.transit_to_sandbox_timeout_ms = int.Parse(matchCardListJson[i]["transit_to_sandbox_timeout_ms"].ToString());
matchCard.match_start_waiting_time_s = int.Parse(matchCardListJson[i]["match_start_waiting_time_s"].ToString());

if(matchCardListJson[i].ContainsKey("match_increment_time_s"))
{
matchCard.match_increment_time_s = int.Parse(matchCardListJson[i]["match_increment_time_s"].ToString());
}
if(matchCardListJson[i].ContainsKey("maxMatchRange"))
{
matchCard.maxMatchRange = int.Parse(matchCardListJson[i]["maxMatchRange"].ToString());
}
if(matchCardListJson[i].ContainsKey("increaseAndDecrease"))
{
matchCard.increaseAndDecrease = int.Parse(matchCardListJson[i]["increaseAndDecrease"].ToString());
}
if(matchCardListJson[i].ContainsKey("initializeCycle"))
{
matchCard.initializeCycle = matchCardListJson[i]["initializeCycle"].ToString();
}
if(matchCardListJson[i].ContainsKey("defaultPoint"))
{
matchCard.defaultPoint = int.Parse(matchCardListJson[i]["defaultPoint"].ToString());
}

if(matchCardListJson[i].ContainsKey("savingPoint"))
{
if(matchCardListJson[i]["savingPoint"].IsArray)
{
for(int listNum = 0; listNum < matchCardListJson[i]["savingPoint"].Count; listNum++)
{
var keyList = matchCardListJson[i]["savingPoint"][listNum].Keys;
foreach(var key in keyList)
{
matchCard.savingPoint.Add(key, int.Parse(matchCardListJson[i]["savingPoint"][listNum][key].ToString()));
}
}
}
else
{
foreach(var key in matchCardListJson[i]["savingPoint"].Keys)
{
matchCard.savingPoint.Add(key, int.Parse(matchCardListJson[i]["savingPoint"][key].ToString()));
}
}
}
matchCardList.Add(matchCard);
}

foreach(var matchCard in matchCardList)
{
Debug.Log(matchCard.ToString());
}
}