Skip to main content
static getCurrentPageNum(): Promise<APIResponse<number>>;

Example

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

/**
 * Example: get the current page index.
 */
export async function exampleGetCurrentPageNum() {
 const res = await PluginCommAPI.getCurrentPageNum();
 if (!res.success) {
 throw new Error(res.error?.message ?? 'getCurrentPageNum call failed');
 }
 return res.result;
}