Skip to main content
Version: 5.18.17

GetUserInfoByInDate

public BackendReturnObject GetUserInfoByInDate(string gamerInDate);

Parameters​

ValueTypeDescription
gamerInDatestringgamerInDate of the user whose information is to be looked up

Description​

Retrieves the user information of the user with the corresponding gamerInDate.

The following information can be looked up:

  • User's nickname
  • User's gamerIndate
  • Last accessed time
  • Name of the guild the user belongs to

Example​

Synchronous​

var bro = Backend.Social.GetUserInfoByInDate("2021-00-00T00:00:00.000Z");

//example
string nickname = bro.GetReturnValuetoJSON()["row"]["nickname"].ToString();
if(bro.GetReturnValuetoJSON()["row"]["guildName"] != null) // null is returned when no guild name is registered
{
string guildName = callback.GetReturnValuetoJSON()["row"]["guildName"].ToString();
}

Asynchronous​

Backend.Social.GetUserInfoByInDate("2021-00-00T00:00:00.000Z", (callback) => 
{
// Post-process

//example
string nickname = callback.GetReturnValuetoJSON()["row"]["nickname"].ToString();
if(callback.GetReturnValuetoJSON()["row"]["guildName"] != null) // null is returned when no guild name is registered
{
string guildName = callback.GetReturnValuetoJSON()["row"]["guildName"].ToString();
}
});

SendQueue​

SendQueue.Enqueue(Backend.Social.GetUserInfoByInDate, "2021-00-00T00:00:00.000Z", (callback) => 
{
// Post-process

//example
string nickname = callback.GetReturnValuetoJSON()["row"]["nickname"].ToString();
if(callback.GetReturnValuetoJSON()["row"]["guildName"] != null) // null is returned when no guild name is registered
{
string guildName = callback.GetReturnValuetoJSON()["row"]["guildName"].ToString();
}
});

ReturnCase​

Success cases​

When a user with the corresponding inDate exists

statusCode : 200

message : Success

returnValue : refer to GetReturnValuetoJSON

When a user with the corresponding inDate does not exist

statusCode : 404

errorCode : NotFoundException

message : gamer does not exist.

GetReturnValuetoJSON​

{
"row":
{
"nickname":"ImATestUser", // User’s nickname (null if non-existent)
"inDate":"2021-00-00T00:00:00.000Z", // User’s inDate
"lastLogin":"2021-06-23T02:08:56.235Z", // Date of the user’s last login
"guildName":"testGuild" // User’s guild name (null if non-existent)
}
}

Sample Code​

  public class SearchUserItem
{
public string nickname;
public string inDate;
public string lastLogin;
public string guildName;
public override string ToString()
{
return $"nickname : {nickname}\ninDate : {inDate}\nlastLogin : {lastLogin}\nguildName : {guildName}\n";
}
};
public void GetUserInfoByInDateTest()
{
string userNickname = "2021-11-24T02:44:14.638Z";

var bro = Backend.Social.GetUserInfoByInDate(userNickname);

if(!bro.IsSuccess())
return;

LitJson.JsonData json = bro.GetReturnValuetoJSON();

SearchUserItem userInfo = new SearchUserItem();

userInfo.nickname = json["row"]["nickname"].ToString();
userInfo.inDate = json["row"]["inDate"].ToString();
userInfo.lastLogin = json["row"]["lastLogin"].ToString();
if(json["row"]["guildName"] != null)
{
userInfo.guildName = json["row"]["guildName"].ToString();
}

Debug.Log(userInfo.ToString());
}