SelectCharacter
public BackendReturnObject SelectCharacter(string uuid, string inDate);
Parameters
Value | Type | Description |
---|---|---|
uuid | string | uuid of the owned character |
inDate | string | inDate of the owned character |
Description
An attempt is made to log in to your character with matching uuid and inDate.
If successful, you will be logged in, and you can call BACKND Base.
Example
Synchronous
var bro = Backend.MultiCharacter.Character.GetCharacterList();
// 0th user
LitJson.JsonData characterJson = bro.GetReturnValuetoJSON()["characters"][0];
string uuid = characterJson["uuid"].ToString();
string inDate = characterJson["inDate"].ToString();
var bro2 = Backend.MultiCharacter.Character.SelectCharacter(uuid, inDate);
if(bro2.IsSuccess()) {
Debug.Log("Login successful");
}
else {
Debug.LogError("Failed to log in " + bro2.ToString());
}
Asynchronous
Backend.MultiCharacter.Character.GetCharacterList(callback => {
if(callback.IsSuccess()) {
// 0th user
LitJson.JsonData characterJson = callback.GetReturnValuetoJSON()["characters"][0];
string uuid = characterJson["uuid"].ToString();
string inDate = characterJson["inDate"].ToString();
Backend.MultiCharacter.Character.SelectCharacter(uuid, inDate, callback2 => {
if(callback2.IsSuccess()) {
Debug.Log("Deleted : " + callback2.ToString());
}
else {
Debug.LogErorr("Failed to delete : " + callback2.ToString());
}
);
}
});
SendQueue
SendQueue.Enqueue(Backend.MultiCharacter.Character.GetCharacterList, callback => {
if(callback.IsSuccess()) {
// 0th user
LitJson.JsonData characterJson = callback.GetReturnValuetoJSON()["characters"][0];
string uuid = characterJson["uuid"].ToString();
string inDate = characterJson["inDate"].ToString();
SendQueue.Enqueue(Backend.MultiCharacter.Character.SelectCharacter, uuid, inDate, callback2 => {
if(callback2.IsSuccess()) {
Debug.Log("Deleted : " + callback2.ToString());
}
else {
Debug.LogErorr("Failed to delete : " + callback2.ToString());
}
);
}
});
ReturnCase
Success cases
When the login succeeds
statusCode : 200
Error cases
When uuid or inDate is null or string.Empty
statusCode : 400
errorCode : ValidationException
When uuid and inDate do not match
statusCode : 404
errorCode : NotFoundException