본문으로 건너뛰기
버전: SDK-5.11.8

GetRandomDataTableList

public BackendReturnObject GetRandomDataTableList();

설명

뒤끝 콘솔에서 생성한 모든 랜덤 조회 내역을 불러옵니다.
해당 리스트에는 다음 정보가 포함되어 있습니다.

  • 랜덤 조회명
  • uuid
  • 분류(user/guild)

Example

동기

Backend.RandomInfo.GetRandomDataTableList();

비동기

Backend.RandomInfo.GetRandomDataTableList((callback) => {
// 이후 처리
});

SendQueue

SendQueue.Enqueue(Backend.RandomInfo.GetRandomDataTableList, (callback) => {
// 이후 처리
});

ReturnCase

Success cases

조회에 성공한 경우
statusCode : 200
message : Success
returnValue : GetReturnValuetoJSON 참조

랜덤 조회가 0개인 경우
statusCode : 200
message : Success
returnValue : {"rows":[]}

GetReturnValuetoJSON

{
"rows": [
{
"randomType": "user",
"uuid": "6f438bd0-01a6-11ed-bdc8-a700365a13a1",
"title": "PVP용 랜덤 조회"
},
{
"randomType": "user",
"uuid": "94b07a80-00f3-11ed-ade3-6d5252f35aa5",
"title": "친구추천용 랜덤 조회"
},
{
"randomType": "guild",
"uuid": "96ab48f0-fce9-11ec-a8e9-3fc17cd7d4bd",
"title": "길드추천용 랜덤 조회"
}
]
}

Sample Code

public class RandomInfoTable {

public string title; // 랜덤 조회 제목
public string uuid; // 랜덤 조회 uuid
public RandomType randomtype; //랜덤 조회 유형

public override string ToString() {
return $"title: {title}\n" +
$"uuid: {uuid}\n" +
$"randomtype: {randomtype}";
}
}
public void GetRandomDataTableList() {

var bro = Backend.RandomInfo.GetRandomDataTableList();

if(bro.IsSuccess()) {

LitJson.JsonData json = bro.Rows();
List<RandomInfoTable> list = new List<RandomInfoTable>();

for(int i = 0; i < json.Count; i++) {

RandomInfoTable table = new RandomInfoTable();

table.title = json[i]["title"].ToString();
table.uuid = json[i]["uuid"].ToString();

if(json[i]["randomType"].ToString() == "user") {
table.randomtype = RandomType.User;
}
else {
table.randomtype = RandomType.Guild;
}
list.Add(table);
}

foreach(var table in list) {
Debug.Log(list.ToString());
}
}
}