getTranslateFileList

Requires:
WearKit≥1.4.0@ray-js/ray≥1.7.82
Platforms:
iOSAndroid
import { wear } from '@ray-js/ray';

const { getTranslateFileList } = wear;

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

Method signature
getTranslateFileList(params: )

Description

Get translation record list.

Parameters

PropertyTypeRequiredDescriptionMinimum SDK versions
directoryIdstringNoDirectory ID; if omitted, all directories are returned
Androidcom.thingclips.smart:thingsmart-bizbundle-wearkit
≥ 6.11.0
recordTypestringNoTranslation type: 0: All record types 1: Real-time speech transcription 2: Face-to-face Translation Pro 3: Face-to-face Translation Basic 4: Text translation
Androidcom.thingclips.smart:thingsmart-bizbundle-wearkit
≥ 6.11.0
deviceIdstringNoDevice ID; if omitted, all devices will be queried
Androidcom.thingclips.smart:thingsmart-bizbundle-wearkit
≥ 6.11.0
orderBystringNoSort field: 0-fileId, 1-recordTime, 2-updateAt; default is fileId if omitted
Androidcom.thingclips.smart:thingsmart-bizbundle-wearkit
≥ 6.11.0
sourcestringNoAudio source, consistent with audioSource
Androidcom.thingclips.smart:thingsmart-bizbundle-wearkit
≥ 6.11.0
ascstringNoSort order: 0-desc, 1-asc; default is desc if omitted
Androidcom.thingclips.smart:thingsmart-bizbundle-wearkit
≥ 6.11.0
lastRecordTransferIdstringNoLast record ID; if omitted or 0, no limit
Androidcom.thingclips.smart:thingsmart-bizbundle-wearkit
≥ 6.11.0
pageSizenumberNoPage size; if omitted or 0, no pagination (all)
Androidcom.thingclips.smart:thingsmart-bizbundle-wearkit
≥ 6.11.0
complete() => voidNoCompletion callback (executed on both success and failure)—
(params: []) => voidNoCallback on successful API call—
fail(params: Object) => voidNoFailure callback—
fail callback parameters
PropertyTypeDescription
errorMsgstringError message
errorCodestring | numberError code
Error extension

Return Value

None

Error Code

Error CodeError Message
10001Internal error

Examples

Basic usage

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

wear.getTranslateFileList({
  deviceId: 'device123',
  pageSize: 20,
  success: (result) => {
    console.log('getTranslateFileList success', result);
  },
  fail: error => {
    console.error(error);
  },
});