Skip to main content
Version: 6.0.0

GetGuildJoinRequestList

public BackndGuildJoinRequestReturnObject GetGuildJoinRequestList();
public BackndGuildJoinRequestReturnObject GetGuildJoinRequestList(int limit);
public BackndGuildJoinRequestReturnObject GetGuildJoinRequestList(int limit, int offset);

BackndGuildJoinRequestReturnObject

GetReturnValueByGuildList

If an error occurred, null is returned.

BackndGuildJoinRequestReturnObject bro = Backnd.Guild.GetGuildJoinRequestList();

foreach(BackndGuildJoinRequestItem item in bro.GetReturnValueByGuildList()) {
Debug.Log(item.ToString());
}

BackndGuildJoinRequestItem

public class BackndGuildJoinRequestItem
{
public string inDate = string.Empty;
public string nickname = string.Empty;

public override string ToString()
{
return $"inDate : {inDate}\nnickname : {nickname}\n";
}
}

Parameters

ValueTypeDescriptiondefault
limitint(Optional) Number of the lists of users who request to join100
offsetint(Optional) Starting point to look up the list of users who request to join(offset)0

Description

The list of users who request to join the guild is looked up.
The applicant list is sorted according to a first-come, first-served rule.

If users 1, 2, and 3 apply in order, the list will show User 1 in the 0th place, User 2 in the 1st place, and User 3 in the 2nd place.

Example

Synchronous

Backnd.Guild.GetGuildJoinRequestList();
Backnd.Guild.GetGuildJoinRequestList(5);
Backnd.Guild.GetGuildJoinRequestList(5, 5);

Asynchronous

Backnd.Guild.GetGuildJoinRequestList((callback) => 
{
// Post-process
});
Backnd.Guild.GetGuildJoinRequestList(5, (callback) =>
{
// Post-process
});
Backnd.Guild.GetGuildJoinRequestList(5, 5, (callback) =>
{
// Post-process
});

Return cases

Success cases

When the lookup is successful
statusCode : 200

returnValue : refer to GetReturnValuetoJSON

When the user is not a guild master or manager
statusCode : 403
errorCode : ForbiddenException

When a user who has not joined a guild calls the method
statusCode : 412
errorCode : PreconditionFailed

GetReturnValuetoJSON

{
rows:
[
{
inDate:{ S:"2018-07-31T01:34:41.461Z" }, // indate of the user who requested to join
nickname:{ S:"customid10" } // Nickname of the user who requested to join
},
{
inDate:{ S:"2018-07-31T01:49:47.260Z" },
nickname:{ S:"customid4" }
}
]
}

Sample code

public class ApplicantsItem
{
public string inDate;
public string nickname;
public override string ToString()
{
return $"nickname : {nickname}\ninDate : {inDate}\n";
}
}
public void GetGuildJoinRequestList()
{
var bro = Backnd.Guild.GetGuildJoinRequestList();

if(!bro.IsSuccess())
return;

List<ApplicantsItem> applicantsList = new List<ApplicantsItem>();

BACKND.LitJson.JsonData applicantsListJson = bro.FlattenRows();

for(int i = 0; i < applicantsListJson.Count; i++)
{
ApplicantsItem applicant = new ApplicantsItem();

if(applicantsListJson[i].ContainsKey("nickname"))
{
applicant.nickname = applicantsListJson[i]["nickname"].ToString();
}
applicant.inDate = applicantsListJson[i]["inDate"].ToString();

applicantsList.Add(applicant);
Debug.Log(applicant.ToString());
}
}