@kyuuseiryuu/bark-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.4.1 • Public • Published

bark-sdk

release workflow

install

npm i @kyuuseiryuu/bark-sdk

usage

const barkServer = new BarkSDK('YOUR_BARK_SERVER');
const user = new BarkUser('YOUR_BARK_KEY');
// const user = new BarkUser('https://YOUR_BARK_SERVER/YOUR_BARK_KEY/这里改成你自己的推送内容');
const notification = new BarkNotification('这里是推送内容');
// const notification = new BarkNotification('这里是推送内容', '标题可有可无');
notification
    .setJumpURL('https://google.com')
    .setSound('bell')
    .setGroup('group1');
// 链式调用设置参数
const newNotification = notification.clone().setTitle('新的一个通知');
barkServer.notify(user, notification);
barkServer.notify(user, newNotification);

View test case demo

resources

License

Code released under the MIT license.

Readme

Keywords

none

Package Sidebar

Install

npm i @kyuuseiryuu/bark-sdk

Weekly Downloads

0

Version

1.4.1

License

MIT

Unpacked Size

16.6 kB

Total Files

15

Last publish

Collaborators

  • kyuuseiryuu