Skip to main content
Version: 5.11.6

GetMyGuildInfoV3

public BackendReturnObject GetMyGuildInfoV3();

Description

Looks up the information of the gamer's currently joined guild.
When the gamer is not a part of the guild, returns statusCode 412, errorCode PreconditionFailed.

Unlike the v2 version, guild goods information is not returned.

Example

Synchronous

Backend.Guild.GetMyGuildInfoV3();

Asynchronous

Backend.Guild.GetMyGuildInfoV3((callback) => 
{
// Post-process
});

SendQueue

SendQueue.Enqueue(Backend.Guild.GetMyGuildInfoV3, (callback) => 
{
// Post-process
});

Return cases

Success cases

When the lookup is successful
statusCode : 200

returnValue : refer to GetReturnValuetoJSON

Error cases

When a user in the old guild looks up
statusCode : 412
errorCode : PreconditionFailed

When a user without a guild attempts lookup
statusCode : 412
errorCode : PreconditionFailed

GetReturnValuetoJSON

{
// Guild information
guild:
{
// Number of guild members
memberCount:{ N: "5" },
// Guild metadata
buf: { N: "1" },
// Guild metadata
level: { S: "silver" },
// 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" },
// Guild master indate
masterInDate: { S: "2019-02-25T06:29:30.022Z" }
// Quick join status(Only exists when set through SetRegistrationValueV3)
_immediateRegistration: { BOOL: "true"},
// Country code(Only exists when country code is added)
_countryCode: {S: "KR"}
}
}

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 GetMyGuildInfoV3()
{
var bro = Backend.Guild.GetMyGuildInfoV3();

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());
}