https://github.com/hoshinorei/typescript-bark-sdk
An SDK for Bark written in TypeScript
https://github.com/hoshinorei/typescript-bark-sdk
bark typescript
Last synced: 2 months ago
JSON representation
An SDK for Bark written in TypeScript
- Host: GitHub
- URL: https://github.com/hoshinorei/typescript-bark-sdk
- Owner: HoshinoRei
- License: mit
- Created: 2023-07-16T13:55:20.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2026-04-04T12:52:33.000Z (2 months ago)
- Last Synced: 2026-04-04T13:23:17.682Z (2 months ago)
- Topics: bark, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@hoshinorei/bark-sdk
- Size: 1.38 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Typescript Bark SDK
## Introduction
An SDK for [Bark](https://github.com/Finb/Bark) written in TypeScript.
### Features
- Using Bark V2 API
- Encrypted push
- Working in the browser and Node.js
- Check if the Bark server is healthy
- Check if the Bark server is running
- Get Bark server information
### Getting started
#### Install
##### pnpm
```shell
pnpm add @hoshinorei/bark-sdk
```
##### Yarn
```shell
yarn add @hoshinorei/bark-sdk
```
##### npm
```shell
npm i @hoshinorei/bark-sdk
```
#### Push a simple message
```ts
import { BarkClient, BarkMessageBuilder } from "@hoshinorei/bark-sdk"
const barkClient = new BarkClient("")
barkClient.push(
new BarkMessageBuilder()
.body("")
.deviceKey("")
.title("")
.build(),
)
```
#### Push an encrypted message
```ts
import {
BarkClient,
BarkEncryptedPushAlgorithm,
BarkMessageBuilder,
} from "@hoshinorei/bark-sdk"
const barkClient = new BarkClient("")
barkClient.pushEncrypted(
"",
new BarkMessageBuilder().body("").title("").build(),
BarkEncryptedPushAlgorithm.AES_128_CBC, // You can view the supported algorithms via the link below
"",
"",
)
```
[Supported algorithm](https://github.com/HoshinoRei/typescript-bark-sdk/wiki/BarkEncryptedPushAlgorithm#enumeration-members)
For More usage, please read [wiki](https://github.com/HoshinoRei/typescript-bark-sdk/wiki/Exports).
## License
[MIT](LICENSE)