static getStickerSize(path: string): Promise<APIResponse<Size>>;
| Parameter | Type | Description |
|---|---|---|
path | string | Sticker path |
APIResponse<Size>:resultisSize
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;
}