-
Notifications
You must be signed in to change notification settings - Fork 0
BarkMessageBuilder
A class to help build Bark message properly
- archive
- badge
- body
- build
- category
- copy
- deviceKey
- group
- icon
- isNotUrlErrorProducer
- level
- sound
- title
- url
• new BarkMessageBuilder(): BarkMessageBuilder
src/lib/BarkMessageBuilder.ts:16
• Protected
barkMessage: BarkMessage
The Bark message which will be built
src/lib/BarkMessageBuilder.ts:14
▸ archive(): BarkMessageBuilder
Set the message as archived
The builder
src/lib/BarkMessageBuilder.ts:24
▸ badge(badge
): BarkMessageBuilder
Set the badge property of the message
Name | Type |
---|---|
badge |
number |
The builder
src/lib/BarkMessageBuilder.ts:34
▸ body(body
): BarkMessageBuilder
Set the body property of the message
Name | Type |
---|---|
body |
string |
The builder
src/lib/BarkMessageBuilder.ts:52
▸ build(): BarkMessage
When all the properties is set, use this function to build the message
Bark message
src/lib/BarkMessageBuilder.ts:43
▸ category(category
): BarkMessageBuilder
Set the category of the message
Name | Type |
---|---|
category |
string |
The builder
src/lib/BarkMessageBuilder.ts:62
▸ copy(copy
): BarkMessageBuilder
Set the copy property of the message
Name | Type |
---|---|
copy |
string |
The builder
src/lib/BarkMessageBuilder.ts:72
▸ deviceKey(deviceKey
): BarkMessageBuilder
Set the device key property of the message
Name | Type |
---|---|
deviceKey |
string |
The builder
src/lib/BarkMessageBuilder.ts:82
▸ group(group
): BarkMessageBuilder
Set the group property of the message
Name | Type |
---|---|
group |
string |
The builder
src/lib/BarkMessageBuilder.ts:92
▸ icon(icon
): BarkMessageBuilder
Set the icon property of the message
Name | Type |
---|---|
icon |
string |
The builder
Throws
BarkMessageError if the argument is not a URL
src/lib/BarkMessageBuilder.ts:103
▸ isNotUrlErrorProducer(argumentName
): BarkMessageError
An error producing function
Name | Type | Description |
---|---|---|
argumentName |
string |
The name of the argument which is not a URL |
Bark message error
src/lib/BarkMessageBuilder.ts:162
▸ level(level
): BarkMessageBuilder
Set the level property of the message
Name | Type |
---|---|
level |
BarkMessageLevel |
The builder
src/lib/BarkMessageBuilder.ts:117
▸ sound(sound
): BarkMessageBuilder
Set the sound property of the message
Name | Type |
---|---|
sound |
BarkMessageSound |
The builder
src/lib/BarkMessageBuilder.ts:127
▸ title(title
): BarkMessageBuilder
Set the title property of the message
Name | Type |
---|---|
title |
string |
The builder
src/lib/BarkMessageBuilder.ts:137
▸ url(url
): BarkMessageBuilder
Set the URL property of the message
Name | Type |
---|---|
url |
string |
The builder
Throws
BarkMessageError if the argument is not a URL