getTranslateRecords(params: Object)

版本要求:
AIKit≥0.0.1@ray-js/ray≥1.6.29
支持平台:
iOSAndroid
import { ai } from '@ray-js/ray';

const { getTranslateRecords } = ai;

// Promise 调用
try {
  const res = await getTranslateRecords({ ...params });
  console.log(res);
} catch (err) {
  console.log(err.errorMsg);
}

描述

获取AI翻译记录列表

参数

属性类型必填说明
deviceIdstring否设备id, 不传会查出所有设备
lastIdnumber否最后一个记录id,不传或0 表示不做限制
pageSizenumber否分页大小,不传或0 表示不分页(全部)
complete() => void否接口调用结束的回调函数(调用成功、失败都会执行)
success(params: Object) => void否接口调用成功的回调函数
fail(params: Object) => void否接口调用失败的回调函数
success 回调参数
属性类型说明
列表
fail 回调参数
属性类型说明
errorMsgstring错误信息
errorCodestring | number错误码
错误扩展

返回值

无

示例代码

import { ai } from '@ray-js/ray'

ai.getTranslateRecords({
  deviceId: "xx",
  lastId: 1,
  pageSize: 1,
  success: data => {
    console.log(data);
  },
  fail: error => {
    console.error(error);
  },
});