def get_records(self, start_time, end_time, msgid=<NUM_LIT:1>,<EOL>number=<NUM_LIT>):
if isinstance(start_time, datetime.datetime):<EOL><INDENT>start_time = time.mktime(start_time.timetuple())<EOL><DEDENT>if isinstance(end_time, datetime.datetime):<EOL><INDENT>end_time = time.mktime(end_time.timetuple())<EOL><DEDENT>record_data = {<EOL>'<STR_LIT>': int(start_time),<EOL>'<STR_LIT>': int(end_time),<EOL>'<STR_LIT>': msgid,<EOL>'<STR_LIT>': number<EOL>}<EOL>res = self._post(<EOL>'<STR_LIT>',<EOL>data=record_data,<EOL>)<EOL>return res<EOL>
获取客服聊天记录

:param start_time: 查询开始时间，UNIX 时间戳
:param end_time: 查询结束时间，UNIX 时间戳，每次查询不能跨日查询
:param msgid: 消息id顺序从小到大，从1开始
:param number: 每次获取条数，最多10000条

:return: 返回的 JSON 数据包