본문으로 건너뛰기

친구 검색

등록된 친구 정보를 조회합니다.

호출 정보

Friend(String friendCode, PlayNANOODelegate callback) {}

호출 상세 정보

파라미터설명타입
friendCode친구 테이블 식별 코드string
callback통신 결과PlayNANOODelegate

소스 코드

using PlayNANOO;

public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;

void Awake()
{
plugin = Plugin.GetInstance();

string friendCode = "string";
plugin.Friend(friendCode, (state, message, rawData, dictionary) => {
if(state.Equals(Configure.PN_API_STATE_SUCCESS)) {
foreach (Dictionary<string, object> value in (ArrayList)dictionary["friends"])
{
Debug.Log(value["relationship_code"]);
Debug.Log(value["uuid"]);
Debug.Log(value["nickname"]);
Debug.Log(value["access_timezone"]);
Debug.Log(value["access_diff"]);
Debug.Log(value["access_timestamp"]);
}
} else {
Debug.Log("Fail");
}
});
}
}

통신 결과

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"code" : 200,
"message" : 0,
"value" : [
{
"relationship_code" : "String"
"uuid" : "String",
"nickname" : "String",
"access_timezone" : "String",
"access_diff" : "Integer",
"access_timestamp" : "Integer"
}
]
}

통신 결과 상세 정보

데이터키설명타입
relationship_code친구 관계 식별 코드string
uuid플레이어 식별 아이디string
nickname플레이어 닉네임string
access_timezone플레이어 접속 시간 타임존string
access_diff플레이어 접속 시간이 현재 시간 기준 지난 시간 (초단위)Integer
access_timestamp플레이어 마지막 접속 시간 Unix TimestampInteger