Multi-Query Player Data
Queries data of other players.
Call Information
public void MultiPlayerDataLoad (MultiLoadParam storageKeys, PlayNANOODelegate callback) {}
Call Information Details
Parameter | Description | Type |
---|---|---|
storageKeys | Player data list | MultiLoadParam |
callback | Communication result | PlayNANOODelegate |
Source Code
using PlayNANOO;
public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;
void Awake()
{
plugin = Plugin.GetInstance();
PlayNANOO.Storage.MultiLoadParam multiLoadParam = new PlayNANOO.Storage.MultiLoadParam();
multiLoadParam.Items.Add(new PlayNANOO.Storage.MultiLoadParamValue { PlayerId = "PLAYER_ID_1", StorageKey = "STORAGE_KEY_1" });
multiLoadParam.Items.Add(new PlayNANOO.Storage.MultiLoadParamValue { PlayerId = "PLAYER_ID_2", StorageKey = "STORAGE_KEY_2" });
plugin.Storage.MultiPlayerDataLoad(multiLoadParam, (status, error, jsonString, values) => {
if (status.Equals(Configure.PN_API_STATE_SUCCESS))
{
foreach (Dictionary<string, object> value in (ArrayList)values["Items"])
{
Debug.Log(value["PlayerId"]);
Debug.Log(value["StorageKey"]);
Debug.Log(value["StorageValue"]);
}
}
else
{
Debug.Log("Fail");
}
});
}
}
Communication Result
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"Items" : [
{
"PlayerId" : "String",
"StorageKey" : "String",
"StorageValue" : "String"
}
]
}
Communication Result
Data Key | Description | Type |
---|---|---|
Items.PlayerId | Player ID | string |
Items.StorageKey | Storage data key | string |
Items.StorageValue | Storage data information | string |