1.0.3 • Published 3 years ago

shoutrrrd-js v1.0.3

Weekly downloads
-
License
AGPL-3.0-or-later
Repository
-
Last release
3 years ago

shoutrrrd-js

A javascript/typescript library for sending messages with shoutrrrd.

Install

npm install shoutrrrd-js

How to use

Set up a shoutrrrd server and configure it.

import { Shoutrrr } from 'shoutrrrd-js'

const shoutrrr = new Shoutrrr('http://localhost:8000')
shoutrrr.send('discord', 'This is a notification message that will be displayed on discord.')
    .then(() => console.log('Message sent'))
    .catch((error) => console.log(`Error ${error} happend while sending message.`))

// or with async

async function main () {
    await shoutrrr.send('service', 'message')
}
main()

Error handling

Following errors can be happen while sending a message:

import {
    ServiceDoesNotExists, // when the service on the service doesn't exist this exception will be thrown.
    InternalServerError 
} from 'shoutrrr-js'
1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago