Skip to main content
static getKeyWords(NOTEPath: string, pageList: number[]): Promise<APIResponse<KeyWord[]>>;
Parameters
ParameterTypeDescription
NOTEPathstringNOTE/DOC file path
pageListnumber[]Page index list (starts from 0)
Returns

Example

import { PluginFileAPI } from 'sn-plugin-lib';

/**
 * Example: get keywords.
 */
export async function exampleGetKeyWords() {
 const NOTEPath = '/storage/emulated/0/Note/demo.note';
 const res = await PluginFileAPI.getKeyWords(NOTEPath, [1]);
 if (!res.success) {
 throw new Error(res.error?.message ?? 'getKeyWords call failed');
 }
 return res.result;
}