Skip to main content
Version: 6.0.0

GetGuildMemberList

public BackndGuildMemberListReturnObject GetGuildMemberList(string guildIndate);
public BackndGuildMemberListReturnObject GetGuildMemberList(string guildIndate, int limit);
public BackndGuildMemberListReturnObject GetGuildMemberList(string guildIndate, string firstKey);
public BackndGuildMemberListReturnObject GetGuildMemberList(string guildIndate, int limit, string firstKey);

BackndGuildMemberListReturnObject

GetReturnValueByGuildMemberItemList

If an error occurred, null is returned.

BackndGuildMemberListReturnObject bro = Backnd.Guild.GetGuildMemberList("guildInDate");

foreach(BackndGuildMemberItem item in bro.GetReturnValueByGuildMemberItemList()) {
Debug.Log(item);
}

BackndGuildMemberItem

public class GuildMemberItem
{
public string nickname = string.Empty;
public string inDate = string.Empty;
public string gamerInDate = string.Empty;
public string position = string.Empty;
public string lastLogin = string.Empty;
public string[] totalGoodsAmount = new string[10] {
"0", "0", "0", "0", "0", "0", "0", "0", "0", "0"
};
}

Parameters

ValueTypeDescriptiondefault
guildIndatestringinDate of the guild to load the guild member list-
limitint(Optional) Number of guild member lists to be loaded100
firstKeystring(Optional) Starting point of guild member list to be loaded(offset)-

Description

Looks up the guild member list that has the guildIndate.

Example

Synchronous

Backnd.Guild.GetGuildMemberList("guildIndate");
Backnd.Guild.GetGuildMemberList("guildIndate", 5);

// When reading the first list, stores the firstkey value,
BackndGuildMemberListReturnObject bro = Backnd.Guild.GetGuildMemberList();
String firstKey = bro.FirstKeyString();
// and reads it again when moving to the next page by setting firstKey as an offset.
Backnd.Guild.GetGuildMemberList("guildIndate", firstKey);
Backnd.Guild.GetGuildMemberList("guildIndate", 5, firstKey);

Asynchronous

Backnd.Guild.GetGuildMemberList("guildIndate", (callback) => 
{
// Post-process
});
Backnd.Guild.GetGuildMemberList("guildIndate", 5, (callback) =>
{
// Post-process
});
// Stores firstKey the same way as the synchronous method, and loads the next list
Backnd.Guild.GetGuildMemberList("guildIndate", firstKey, (callback) =>
{
// Post-process
});
Backnd.Guild.GetGuildMemberList("guildIndate", 20, firstKey, (callback) =>
{
// Post-process
});

Return cases

Success cases

When the lookup is successful
statusCode : 200

returnValue : refer to GetReturnValuetoJSON

Error cases

When the guildIndate does not exist
statusCode : 404
errorCode : NotFoundException

GetReturnValuetoJSON

{
rows:
[
// Guild member 1
{
// Total amount of guild member 1's contribution(+use) of goods 2
totalGoods2Amount:{ N:"21" },
// Total amount of guild member 1's contribution(+use) of goods 3
totalGoods3Amount:{ N:"8" },
// Nickname of guild member 1
nickname:{ S:"id2" },
// Guild indate of guild member 1(time when the member joined the guild)
inDate:{ S:"2018-11-21T05:42:24.511Z" },
// indate of guild member 1
gamerInDate:{ S:"2018-11-08T03:32:18.210Z" },
// Guild privilege of guild member 1(master/viceMaster/member)
position:{ S:"master" },
//Last access date
lastLogin:{S:"2021-07-23T07:42:01.019Z"}
},
// Guild member 2
{
totalGoods2Amount:{ N:"0" },
totalGoods3Amount:{ N:"0" },
inDate:{ S:"2018-11-22T05:45:11.638Z" },
gamerInDate:{ S:"2018-11-13T01:46:25.323Z" },
totalGoods1Amount:{ N:"0" },
position:{ S:"member" },
lastLogin:{S:"2021-07-22T01:49:01.019Z"}
},
],
//When firstKey exists
firstKey:{"inDate":{"S":"2021-07-15T01:18:02.841Z"}}
//When firstKey does not exist
firstKey:null
}

Sample code

public class GuildMemberItem
{
public string nickname;
public string inDate;
public string gamerInDate;
public string position;
public string lastLogin;
public Dictionary<string, int> totalGoodsAmount = new Dictionary<string, int>();
public override string ToString()
{
string goodsString = string.Empty;
foreach(var dic in totalGoodsAmount)
{
goodsString += $"{dic.Key} : {dic.Value}\n";
}
return $"nickname : {nickname}\n" +
$"inDate : {inDate}\n" +
$"gamerInDate : {gamerInDate}\n" +
$"position : {position}\n" +
$"lastLogin : {lastLogin}\n" +
goodsString;
}
};
public void GetGuildMemberList()
{
var bro = Backnd.Guild.GetGuildMemberList("2021-10-29T06:32:10.147Z");

if(!bro.IsSuccess())
return;

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

List<GuildMemberItem> guildMemberList = new List<GuildMemberItem>();

for(int i = 0; i < guildMemberJson.Count; i++)
{
GuildMemberItem member = new GuildMemberItem();

member.nickname = guildMemberJson[i]["nickname"].ToString();
member.inDate = guildMemberJson[i]["inDate"].ToString();
member.gamerInDate = guildMemberJson[i]["gamerInDate"].ToString();
member.lastLogin = guildMemberJson[i]["lastLogin"].ToString();
member.position = guildMemberJson[i]["position"].ToString();
foreach(var goods in guildMemberJson[i].Keys)
{
if(goods.Contains("totalGoods"))
{
member.totalGoodsAmount.Add(goods, int.Parse(guildMemberJson[i][goods].ToString()));
}
}

guildMemberList.Add(member);
Debug.Log(member.ToString());
}
}