본문으로 건너뛰기

랜덤 검색

최근 접속 플레이어 중 나와 친구관계가 아닌 플레이어를 검색 합니다.

호출 정보

FriendRandomSearch(string friendCode, int searchLimit, PlayNANOODelegate callback) {}

호출 상세 정보

파라미터설명타입
friendCode친구 테이블 식별 코드string
searchLimit조회 수량 (최대 10명)integer
callback통신 결과PlayNANOODelegate

소스 코드

using PlayNANOO;

public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;

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

string friendCode = "string";
int searchLimit = 10;
plugin.FriendRandomSearch(friendCode, searchLimit, (state, message, rawData, dictionary) => {
if(state.Equals(Configure.PN_API_STATE_SUCCESS)) {
foreach (Dictionary<string, object> value in (ArrayList)dictionary["friends"])
{
Debug.Log(value["uuid"]);
Debug.Log(value["open_id"]);
Debug.Log(value["nickname"]);
Debug.Log(value["signin_time"]);
Debug.Log(value["signin_date"]);
}
} else {
Debug.Log("Fail");
}
});
}
}

통신 결과

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

통신 결과 상세 정보

데이터키설명타입
uuid플레이어 식별 아이디string
open_id플레이어 식별 오픈 아이디string
nickname플레이어 닉네임string
signin_time플레이어 접속 시간이 현재 시간 기준 지난 시간 (초단위)string
signin_date플레이어 마지막 접속 시간string