1.2.0
🦕 Module for Availability Monitoring - Sending Notifications via Telegram.
Repository
Current version released
4 years ago
Dependencies
deno.land/x
Usage Example for Your Code
This availability monitor sends notifications via telegram if an api is not available.
import { Monitor } from "https://deno.land/x/monitoring@1.2.0/monitor.ts"
// import { token } from './topsecret/.env.ts'
const chatIdForResults = 176632339
const url = 'http://api.open-notify.org/iss-now.json'
const everyXMinutes = 1
// const telegramBotToken = token // commenting this out as I should not publish my token :)
// await Monitor.checkURLsRegularly(chatIdForResults, [url], everyXMinutes, telegramBotToken)
Call usage example via command line
deno run --allow-net https://deno.land/x/monitoring@1.2.0/usage-example.ts
Execute the tests
deno test --allow-net https://deno.land/x/monitoring@1.2.0/test.ts