[TOC]
get_token(uid, callback = None, timeout = 0)
- uid: (Required | int) the user id
- callback: (Optional | a sub-class of GetTokenCallback ) used in async implementation
class GetTokenCallback(object):
def callback(self, token, error_code):
pass- in async implementation, return None
- in sync implementation:
- token: (str) the login token when quest is successful, or None when failed
- error_code: (int) the error code when quest is fail, or FPNN_ERROR.FPNN_EC_OK when success
remove_token(uid, callback = None, timeout = 0)
- uid: (Required | int) the user id
- 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