APIResponse<Element>: element type: seeElement
PluginFileAPI
getLastElement
Get the last element of the current note page.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Get the last element of the current note page.
static getLastElement(): Promise<APIResponse<Element>>;
APIResponse<Element>:
element type: see Elementimport { PluginFileAPI } from 'sn-plugin-lib';
/**
* Example: get the last element of the current note page.
*/
export async function exampleGetLastElement() {
const res = await PluginFileAPI.getLastElement();
if (!res.success) {
throw new Error(res.error?.message ?? 'getLastElement call failed');
}
return res.result;
}