등록 및 관리
플레이어 닉네임을 등록 및 변경합니다.
호출 정보
NicknamePut(string nickname, bool isCheckExists, PlayNANOODelegate callback) {}
호출 상세 정보
파라미터 | 설명 | 타입 |
---|---|---|
nickname | 플레이어 닉네임 | string |
isCheckExists | 플레이어 닉네임 중복 확인 여부 False 설정 시 닉네임 중복 등록이 가능합니다. | boolean |
callback | 통신 결과 | PlayNANOODelegate |
소스 코드
using PlayNANOO;
public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;
void Start()
{
plugin = Plugin.GetInstance();
string nickname = "string";
bool isCheckExists = true;
plugin.AccountManagerV20240401.NicknamePut(nickname, isCheckExists, (status, errorCode, jsonString, values) => {
if (status.Equals(Configure.PN_API_STATE_SUCCESS))
{
Debug.Log(values["nickname"].ToString());
}
else
{
if (values != null)
{
if (values["ErrorCode"].ToString() == "30007")
{
Debug.Log(values["WithdrawalKey"].ToString());
}
else if (values["ErrorCode"].ToString() == "70002")
{
Debug.Log(values["BlockKey"].ToString());
}
else
{
Debug.Log("Fail");
}
}
else
{
Debug.Log("Fail");
}
}
});
}
}
통신 결과
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"Nickname" : "String"
}
통신 결과 상세 정보
데이터키 | 설명 | 타입 |
---|---|---|
Nickname | 플레이어 닉네임 | string |
WithdrawalKey | 탈퇴 계정 조회 키 | string |
에러 정보
플레이어 정보가 존재하는 경우
ErrorCode : 10008
ErrorMessage : ExistsValueException
플레이어 정보가 존재하지 않을 경우.
ErrorCode : 30000
ErrorMessage : NotFoundAccountException
플레이어가 탈퇴를 신청한 경우
ErrorCode : 30007
ErrorMessage : WithDrawalException