getTranslateRecords(params: Object)

Requires:
AIKit≥0.0.1@ray-js/ray≥1.6.29
Platforms:
iOSAndroid
import { ai } from '@ray-js/ray';

const { getTranslateRecords } = ai;

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

Description

Get AI translation record list

Parameters

PropertyTypeRequiredDescription
deviceIdstringNoDevice ID; omit to fetch all devices
lastIdnumberNoID of the last record; omit or set to 0 for no limit
pageSizenumberNoPage size; omit or set to 0 for no pagination (all)
complete() => voidNoCompletion callback (executed on both success and failure)
success(params: Object) => voidNoCallback on successful API call
fail(params: Object) => voidNoFailure callback
success callback parameters
PropertyTypeDescription
List
fail callback parameters
PropertyTypeDescription
errorMsgstringError message
errorCodestring | numberError code
Error extension

Return Value

None

Examples

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

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