[TOC]
class AudioInfo(object):
def __init__(self):
self.source_language = ""
self.recognized_language = ""
self.recognized_text = ""
self.duration = 0
class TranslatedInfo(object):
def __init__(self):
self.source_language = ""
self.target_language = ""
self.source_text = ""
self.target_text = ""
class RTMMessage(object):
def __init__(self):
self.from_uid = 0
self.to_id = 0
self.message_type = 0
self.message_id = 0
self.message = None
self.attrs = None
self.modified_time = 0
self.audio_info = None
- When
message_type == ChatMessageType.AUDIO,audio_infowill be assigned, and themessagemay be the recognized message, or empty string; - When
message_typeis a kinds of File types,messagewill be assigned the stored address.
class RetrievedMessage(object):
def __init__(self):
self.cursor_id = 0
self.message_type = 0
self.message = None
self.attrs = None
self.modified_time = 0
class HistoryMessage(RTMMessage):
def __init__(self):
self.cursor_id = 0
-
Using for history message result.
-
The fields are same as the
class RTMMessage.
class HistoryMessageResult(object):
def __init__(self):
self.count = 0
self.last_cursor_id = 0
self.begin_msec = 0
self.end_msec = 0
self.messages = []
-
HistoryMessageResult.messages is a list of
HistoryMessage -
Using as the result of history message & chat methods.
-
When calling history message or history chat methods for fetching subsequent message or chat data, please using the corresponding fields in the result.