Skip to main content
Version: 5.11.4

GetQuestionList

public BackendReturnObject GetQuestionList();
public BackendReturnObject GetQuestionList(string firstKeyString);

Description

The list of inquiries you sent is loaded.
Up to 10 inquiries can be loaded; more than 10 inquiries must be looked up using firstKey.
When firstKey is string.Empty, the most recent 10 queries are loaded.(The same result as the GetQuestionList() method)
When an answer is provided, answerDate and answer columns are added, and the flag changes to Answered.

Example

Synchronous

var bro = Backend.Question.GetQuestionList();

Asynchronous

Backend.Question.GetQuestionList(callback => {

});

SendQueue

SendQueue.Enqueue(Backend.Question.GetQuestionList, callback => {

});

Return cases

Success cases

When loaded successfully
statusCode : 200

returnValue : refer to GetReturnValuetoJSON

When the registered inquiry does not exist
statusCode : 200

returnValue : {"rows":[]}

GetReturnValuetoJSON

When firstKey exists(if there are more inquiries to load)

{
"rows": [
{
"content": "This game could use competitive content to make it more fun to play.",
"flag": "Pending",
"nickname": "a0",
"inDate": "2023-04-10T07:28:09.591Z",
"images": [],
"type": "Suggestions",
"title": "Please add a ranking function"
},
{
"answerDate": "2023-04-11T04:46:43.783Z", // The purchase has been completed for this case.
"content": "I did not receive 1,000 Gold that I purchased at 7:48.",
"flag": "Answered",
"nickname": "BACKND Master",
"inDate": "2023-04-10T08:41:49.490Z",
"images": [],
"answer": "Hello, we express our sincere apology as we have conducted an investigation and found that the item was not sent. As such, we have sent it via mail.",
"title": "Did not receive the item I purchased"
"type": "Payment"
}
],
"firstKey": {
"gamer_id": {
"S": "62857bd0-dbed-11ec-84d6-89b591e5ae87_OneOnOneQuestion"
},
"inDate": {
"S": "2023-04-10T07:19:23.222Z"
}
}
}

Example Code

class QuestionData {
public DateTime answerDate;
public string content;
public string flag;
public string nickname;
public string inDate;
public string answer;
public string title;
public string type;
public override string ToString() {
return $"answerDate : {answerDate}\n" +
$"content : {content}\n" +
$"flag : {flag}\n" +
$"nickname : {nickname}\n" +
$"inDate : {inDate}\n" +
$"answer : {answer}\n" +
$"title : {title}\n" +
$"type : {type}\n"
;
}
}
List<QuestionData> questionDataList = new List<QuestionData>();

// Key for paging(10 more can be called from the last point after calling 10)
string firstKeyString = string.Empty;

do {
// When firstKey is string.Empty, the first inquiry is loaded.(The same result as GetQuestionList())
var bro = Backend.Question.GetQuestionList(firstKeyString);
firstKeyString = bro.FirstKeystring();

foreach(LitJson.JsonData jsonData in bro.Rows()) {
QuestionData questionData = new QuestionData();

if(jsonData.ContainsKey("answerDate")) {
questionData.answerDate = DateTime.Parse(jsonData["answerDate"].ToString());
}

questionData.content = jsonData["content"].ToString();
questionData.flag = jsonData["flag"].ToString();
questionData.nickname = jsonData["nickname"].ToString();
questionData.inDate = jsonData["inDate"].ToString();
questionData.title = jsonData["title"].ToString();
questionData.type = jsonData["type"].ToString();

if(jsonData.ContainsKey("answer")) {
questionData.answer = jsonData["answer"].ToString();
}

questionDataList.Add(questionData);
}
}
while(string.IsNullOrEmpty(firstKeyString) == false);

foreach(var data in questionDataList) {
Debug.Log(data.ToString());
}