# @kyuuseiryuu/bark-sdk

> ![release workflow](https://github.com/kyuuseiryuu/bark-sdk/actions/workflows/release-package.yml/badge.svg)

Latest version **1.4.1** (published 2022-06-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @kyuuseiryuu/bark-sdk
pnpm add @kyuuseiryuu/bark-sdk
yarn add @kyuuseiryuu/bark-sdk
bun add @kyuuseiryuu/bark-sdk
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.1 |
| Published | 2022-06-27 |
| First published | 2022-05-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 16.2 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| Author | kyuuseiryuu |
| Maintainers | kyuuseiryuu |

## Links

- npm: https://www.npmjs.com/package/@kyuuseiryuu/bark-sdk
- Homepage: https://github.com/kyuuseiryuu/bark-sdk
- npm.io page: https://npm.io/package/@kyuuseiryuu/bark-sdk

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^0.27.2

## Recent versions

- 1.4.1 (latest) — 2022-06-27
- 1.4.0 — 2022-06-01
- 1.3.3 — 2022-06-01
- 1.3.2 — 2022-05-29
- 1.3.1 — 2022-05-28
- 1.3.0 — 2022-05-27
- 1.2.2 — 2022-05-25
- 1.2.1 — 2022-05-25
- 1.0.0 — 2022-05-22

## README

# bark-sdk
![release workflow](https://github.com/kyuuseiryuu/bark-sdk/actions/workflows/release-package.yml/badge.svg)

## install
``` bash
npm i @kyuuseiryuu/bark-sdk
```
## usage

```typescript
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](./__test__)

# resources
- [https://github.com/Finb/Bark](https://github.com/Finb/Bark)

# License
Code released under the [MIT](./LICENSE) license.

---
_Source: https://npm.io/package/@kyuuseiryuu/bark-sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
