Skip to main content
Version: 5.11.8

GetGuildInfoV3

public BackendReturnObject GetGuildInfoV3(string guildIndate);

Parameter

ValueTypeDescription
guildIndatestringindate of the guild to receive the information from

Description

Looks up the information of the guild with the guildIndate.

Example

Synchronous

Backend.Guild.GetGuildInfoV3("guildIndate");

Asynchronous

Backend.Guild.GetGuildInfoV3("guildIndate", callback => 
{
// Post-process
});

SendQueue

SendQueue.Enqueue(Backend.Guild.GetGuildInfoV3, "guildIndate", 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

When the old guild is looked up
statusCode : 412
errorCode : PreconditionFailed

GetReturnValuetoJSON

{
// Guild information
guild:
{
// Number of guild members
memberCount:{ N: "5" },
// Vice guild master list
viceMasterList:
{
L:
[
{
M:
{
// Vice guild master indate
inDate: { S: "2019-02-25T06:29:28.849Z" },
// Vice guild master's nickname
nickname: { S: "id23" }
}
},
{
M:
{
inDate: { S: "2019-02-25T06:29:27.533Z" },
nickname: { S: "id22" }
}
}
]
},
// Guild master's nickname
masterNickname: { S: "id24" },
// Guild indate
inDate: { S: "2019-04-12T07:38:16.522Z" },
// Guild name
guildName: { S: "mumin" },
// Amount of guild goods
goodsCount:{ N: "2" },
// Quick join status(Only exists when set through SetRegistrationValueV3)
_immediateRegistration: { BOOL: "true"},
// Country code(Only exists when country code is added)
_countryCode: {S: "KR"},
// Guild master indate
masterInDate: { S: "2019-02-25T06:29:30.022Z" }
}
}

Sample code

public class GuildItem
{
public int memberCount;
public Dictionary<string, string> viceMasterList = new Dictionary<string, string>();
public string masterNickname;
public string inDate;
public string guildName;
public int goodsCount;
public bool _immediateRegistration;
public string _countryCode;
public string masterInDate;
public override string ToString()
{
string viceMasterString = string.Empty;
foreach(var li in viceMasterList)
{
viceMasterString += $"Vice guild master : {li.Value}({li.Key})\n";
}
return $"memberCount : {memberCount}\n" +
$"masterNickname : {masterNickname}\n" +
$"inDate : {inDate}\n" +
$"guildName : {guildName}\n" +
$"goodsCount : {goodsCount}\n" +
$"_immediateRegistration : {_immediateRegistration}\n" +
$"_countryCode : {_countryCode}\n" +
$"masterInDate : {masterInDate}\n" +
$"memberCount : {memberCount}\n" +
viceMasterString;
}
};
public void GetGuildInfoV3()
{
var bro = Backend.Guild.GetGuildInfoV3("2021-12-16T08:51:00.706Z");

if(!bro.IsSuccess())
return;

LitJson.JsonData json = bro.GetFlattenJSON();

List<GuildItem> guildList = new List<GuildItem>();

GuildItem guildItem = new GuildItem();

guildItem.memberCount = int.Parse(json["guild"]["memberCount"].ToString());
guildItem.masterNickname = json["guild"]["masterNickname"].ToString();
guildItem.inDate = json["guild"]["inDate"].ToString();
guildItem.guildName = json["guild"]["guildName"].ToString();
guildItem.goodsCount = int.Parse(json["guild"]["goodsCount"].ToString());
if(json["guild"].ContainsKey("_immediateRegistration"))
{
guildItem._immediateRegistration = json["guild"]["_immediateRegistration"].ToString() == "True" ? true : false;
}
if(json["guild"].ContainsKey("_countryCode"))
{
guildItem._countryCode = json["guild"]["_countryCode"].ToString();
}
guildItem.masterInDate = json["guild"]["masterInDate"].ToString();
LitJson.JsonData viceListJson = json["guild"]["viceMasterList"];
for(int j = 0; j < viceListJson.Count; j++)
{
guildItem.viceMasterList.Add(viceListJson[j]["inDate"].ToString(), viceListJson[j]["nickname"].ToString());
}

guildList.Add(guildItem);
Debug.Log(guildItem.ToString());
}