getTranslateFileList(params: Object)

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);
}

Description

Get translation record list.

Parameters

PropertyTypeRequiredDescription
directoryIdstringNoDirectory ID; if omitted, all directories are returned
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
deviceIdstringNoDevice ID; if omitted, all devices will be queried
orderBystringNoSort field: 0-fileId, 1-recordTime, 2-updateAt; default is fileId if omitted
sourcestringNoAudio source, consistent with audioSource
ascstringNoSort order: 0-desc, 1-asc; default is desc if omitted
lastRecordTransferIdstringNoLast record ID; if omitted or 0, no limit
pageSizenumberNoPage size; if omitted or 0, no pagination (all)
complete() => voidNoCompletion callback (executed on both success and failure)
NoCallback 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);
  },
});