Skip to main content
static getStickerSize(path: string): Promise<APIResponse<Size>>;
Parameters
ParameterTypeDescription
pathstringSticker path
Returns

Example

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

/**
 * Example: get sticker size.
 */
export async function exampleGetStickerSize() {
 const stickerPath = '/storage/emulated/0/Note/stickers/demo.png';
 const res = await PluginCommAPI.getStickerSize(stickerPath);
 if (!res.success) {
 throw new Error(res.error?.message ?? 'getStickerSize call failed');
 }
 return res.result;
}