updateTranslateRecord(params: Object)

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

const { updateTranslateRecord } = ai;

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

Description

Update translation record

Parameters

PropertyTypeRequiredDescription
translateIdnumberYesTranslation record ID
namestringNoFile name; omit to leave unchanged
summaryStatusstringNoSummary status: 0 Not summarized, 1 In progress, 2 Completed, 3 Failed; omit to leave unchanged
visitstringNoWhether already clicked; omit to leave unchanged
removestringNoWhether removed (moved to trash); omit to leave unchanged
complete() => voidNoCompletion callback (executed on both success and failure)
success() => voidNoCallback on successful API call
fail(params: Object) => voidNoFailure callback
fail callback parameters
PropertyTypeDescription
errorMsgstringError message
errorCodestring | numberError code
Error extension

Return Value

None

Examples

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

ai.updateTranslateRecord({
  translateId: 1,
  name: "xx",
  summaryStatus: "xx",
  visit: "xx",
  remove: "xx",
  success: data => {
    console.log(data);
  },
  fail: error => {
    console.error(error);
  },
});