Store Data
Stores general data.
Call Information
CacheSet(String dataKey, String dataValue, Integer dataTtl, PlayNANOODelegate callback) {}
Call Information Details
Parameter | Description | Type |
---|---|---|
dataKey | Cache data key | string |
dataValue | Cache data value | string |
dataTtl | Cache data expiration time (In seconds) | integer |
callback | Communication result | PlayNANOODelegate |
Source Code
using PlayNANOO;
public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;
void Awake()
{
plugin = Plugin.GetInstance();
string dataKey = "string";
string dataValue = "string";
int dataTtl = 60;
plugin.CacheSet(dataKey, dataValue, dataTtl, (state, message, rawData, dictionary) => {
if (state.Equals(Configure.PN_API_STATE_SUCCESS))
{
Debug.Log("Success");
}
else
{
Debug.Log("Fail");
}
});
}
}
Communication Result
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"code" : 200,
"message" : 0,
"value" : {}
}