본문으로 건너뛰기

데이터 멀티 조회

일반 데이터를 조회 합니다.

호출 정보

CacheMultiGet(ArrayList dataKeys, PlayNANOODelegate callback) {}

호출 상세 정보

파라미터설명타입
dataKeys데이터 키ArrayList
callback통신 결과PlayNANOODelegate

소스 코드

using PlayNANOO;

public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;

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

ArrayList cacheKeys = new ArrayList();
cacheKeys.Add("TEST001");
cacheKeys.Add("TEST002");
cacheKeys.Add("TEST003");

plugin.CacheMultiGet(cacheKeys, (state, message, rawData, dictionary) => {
if (state.Equals(Configure.PN_API_STATE_SUCCESS))
{
foreach (Dictionary<string, object> value in (ArrayList)dictionary["values"])
{
Debug.Log(value["key"]);
Debug.Log(value["value"]);
}
}
else
{
Debug.Log("Fail");
}
});
}
}

통신 결과

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"code" : 200,
"message" : 0,
"value" : [
{
"key" : "String",
"value" : "String"
}
]
}

통신 결과 상세 정보

데이터키설명타입
value.key데이터 키string
value.value데이터 값string