跳转到主要内容

数据查询

查询常规数据。

调用信息

CacheGet(String dataKey, PlayNANOODelegate callback) {}

调用详细信息

参数说明类型
dataKey数据键string
callback通信结果PlayNANOODelegate

源代码

using PlayNANOO;

public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;

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

string dataKey = "string";
plugin.CacheGet(dataKey, (state, message, rawData, dictionary) => {
if (state.Equals(Configure.PN_API_STATE_SUCCESS))
{
Debug.Log(dictionary["value"].ToString());
}
else
{
Debug.Log("Fail");
}
});
}
}

通信结果

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

通信结果详细信息

数据键说明类型
value数据结果值string