sendToNote(params: Object)

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

const { sendToNote } = wear;

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

Description

Send translation to summary API.

Parameters

PropertyTypeRequiredDescription
fileIdstringNoFile ID in the translation table
recordIdstringNorecordid in the translation table
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
fileIdstringRecord ID generated after sending to Note
recordIdstringrecordid in the translation table
fail callback parameters
PropertyTypeDescription
errorMsgstringError message
errorCodestring | numberError code
Error extension

Return Value

None

Error Code

Error CodeError Message
10001Internal error
10012Record not found

Examples

Basic usage

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

wear.sendToNote({
  fileId: 'file1',
  success: (result) => {
    console.log('sendToNote success', result);
  },
  fail: error => {
    console.error(error);
  },
});