[TOC]
data_set(uid, key, value, callback = None, timeout = 0)
- uid: (Required | int) user id
- key: (Required | str) data key
- value: (Required | str) data value
- callback: (Optional | a sub-class of BasicCallback ) used in async implementation
class BasicCallback(object):
def callback(self, error_code):
pass- in async implementation, return None
- in sync implementation:
- error_code: (int) the error code when quest is fail, or FPNN_ERROR.FPNN_EC_OK when success
data_delete(uid, key, callback = None, timeout = 0)
- uid: (Required | int) user id
- key: (Required | str) data key
- callback: (Optional | a sub-class of BasicCallback ) used in async implementation
class BasicCallback(object):
def callback(self, error_code):
pass- in async implementation, return None
- in sync implementation:
- error_code: (int) the error code when quest is fail, or FPNN_ERROR.FPNN_EC_OK when success
data_get(uid, key, callback = None, timeout = 0)
- uid: (Required | int) user id
- key: (Required | str) data key
- callback: (Optional | a sub-class of DataGetCallback ) used in async implementation
class DataGetCallback(object):
def callback(self, value, error_code):
pass-
in async implementation, return None
-
in sync implementation:
- value: (str) data value
- error_code: (int) the error code when quest is fail, or FPNN_ERROR.FPNN_EC_OK when success