mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-27 16:54:04 +00:00
New notification provider: CallMeBot API (#4605)
Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
parent
effd0197ac
commit
937c8a9a7b
6 changed files with 42 additions and 0 deletions
23
server/notification-providers/call-me-bot.js
Normal file
23
server/notification-providers/call-me-bot.js
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
const NotificationProvider = require("./notification-provider");
|
||||||
|
const axios = require("axios");
|
||||||
|
|
||||||
|
class CallMeBot extends NotificationProvider {
|
||||||
|
name = "CallMeBot";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
|
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
|
||||||
|
const okMsg = "Sent Successfully.";
|
||||||
|
try {
|
||||||
|
const url = new URL(notification.callMeBotEndpoint);
|
||||||
|
url.searchParams.set("text", msg);
|
||||||
|
await axios.get(url.toString());
|
||||||
|
return okMsg;
|
||||||
|
} catch (error) {
|
||||||
|
this.throwGeneralAxiosError(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = CallMeBot;
|
|
@ -6,6 +6,7 @@ const AliyunSms = require("./notification-providers/aliyun-sms");
|
||||||
const Apprise = require("./notification-providers/apprise");
|
const Apprise = require("./notification-providers/apprise");
|
||||||
const Bark = require("./notification-providers/bark");
|
const Bark = require("./notification-providers/bark");
|
||||||
const ClickSendSMS = require("./notification-providers/clicksendsms");
|
const ClickSendSMS = require("./notification-providers/clicksendsms");
|
||||||
|
const CallMeBot = require("./notification-providers/call-me-bot");
|
||||||
const SMSC = require("./notification-providers/smsc");
|
const SMSC = require("./notification-providers/smsc");
|
||||||
const DingDing = require("./notification-providers/dingding");
|
const DingDing = require("./notification-providers/dingding");
|
||||||
const Discord = require("./notification-providers/discord");
|
const Discord = require("./notification-providers/discord");
|
||||||
|
@ -80,6 +81,7 @@ class Notification {
|
||||||
new Apprise(),
|
new Apprise(),
|
||||||
new Bark(),
|
new Bark(),
|
||||||
new ClickSendSMS(),
|
new ClickSendSMS(),
|
||||||
|
new CallMeBot(),
|
||||||
new SMSC(),
|
new SMSC(),
|
||||||
new DingDing(),
|
new DingDing(),
|
||||||
new Discord(),
|
new Discord(),
|
||||||
|
|
|
@ -115,6 +115,7 @@ export default {
|
||||||
"apprise": this.$t("apprise"),
|
"apprise": this.$t("apprise"),
|
||||||
"Bark": "Bark",
|
"Bark": "Bark",
|
||||||
"clicksendsms": "ClickSend SMS",
|
"clicksendsms": "ClickSend SMS",
|
||||||
|
"CallMeBot": "CallMeBot (WhatsApp, Telegram Call, Facebook Messanger)",
|
||||||
"discord": "Discord",
|
"discord": "Discord",
|
||||||
"GoogleChat": "Google Chat (Google Workspace)",
|
"GoogleChat": "Google Chat (Google Workspace)",
|
||||||
"gorush": "Gorush",
|
"gorush": "Gorush",
|
||||||
|
|
13
src/components/notifications/CallMeBot.vue
Normal file
13
src/components/notifications/CallMeBot.vue
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<template>
|
||||||
|
<div class="mb-3">
|
||||||
|
<label for="callmebot-endpoint" class="form-label">{{ $t("Endpoint") }}</label>
|
||||||
|
<input id="callmebot-endpoint" v-model="$parent.notification.callMeBotEndpoint" type="text" class="form-control" required>
|
||||||
|
<i18n-t tag="div" keypath="callMeBotGet" class="form-text">
|
||||||
|
<a href="https://www.callmebot.com/blog/free-api-facebook-messenger/" target="_blank">Facebook Messenger</a>
|
||||||
|
<a href="https://www.callmebot.com/blog/test-whatsapp-api/" target="_blank">WhatsApp</a>
|
||||||
|
<a href="https://www.callmebot.com/blog/telegram-phone-call-using-your-browser/" target="_blank">Telegram Call</a>
|
||||||
|
1 message / 10 sec; 1 call / 65 sec
|
||||||
|
<!--There is no public documentation available. This data is based on testing!-->
|
||||||
|
</i18n-t>
|
||||||
|
</div>
|
||||||
|
</template>
|
|
@ -4,6 +4,7 @@ import AliyunSMS from "./AliyunSms.vue";
|
||||||
import Apprise from "./Apprise.vue";
|
import Apprise from "./Apprise.vue";
|
||||||
import Bark from "./Bark.vue";
|
import Bark from "./Bark.vue";
|
||||||
import ClickSendSMS from "./ClickSendSMS.vue";
|
import ClickSendSMS from "./ClickSendSMS.vue";
|
||||||
|
import CallMeBot from "./CallMeBot.vue";
|
||||||
import SMSC from "./SMSC.vue";
|
import SMSC from "./SMSC.vue";
|
||||||
import DingDing from "./DingDing.vue";
|
import DingDing from "./DingDing.vue";
|
||||||
import Discord from "./Discord.vue";
|
import Discord from "./Discord.vue";
|
||||||
|
@ -67,6 +68,7 @@ const NotificationFormList = {
|
||||||
"apprise": Apprise,
|
"apprise": Apprise,
|
||||||
"Bark": Bark,
|
"Bark": Bark,
|
||||||
"clicksendsms": ClickSendSMS,
|
"clicksendsms": ClickSendSMS,
|
||||||
|
"CallMeBot": CallMeBot,
|
||||||
"smsc": SMSC,
|
"smsc": SMSC,
|
||||||
"DingDing": DingDing,
|
"DingDing": DingDing,
|
||||||
"discord": Discord,
|
"discord": Discord,
|
||||||
|
|
|
@ -888,6 +888,7 @@
|
||||||
"What is a Remote Browser?": "What is a Remote Browser?",
|
"What is a Remote Browser?": "What is a Remote Browser?",
|
||||||
"wayToGetHeiiOnCallDetails": "How to get the Trigger ID and API Keys is explained in the {documentation}",
|
"wayToGetHeiiOnCallDetails": "How to get the Trigger ID and API Keys is explained in the {documentation}",
|
||||||
"documentationOf": "{0} Documentation",
|
"documentationOf": "{0} Documentation",
|
||||||
|
"callMeBotGet": "Here you can generate an endpoint for {0}, {1} and {2}. Keep in mind that you might get rate limited. The ratelimits appear to be: {3}",
|
||||||
"gtxMessagingApiKeyHint": "You can find your API key at: My Routing Accounts > Show Account Information > API Credentials > REST API (v2.x)",
|
"gtxMessagingApiKeyHint": "You can find your API key at: My Routing Accounts > Show Account Information > API Credentials > REST API (v2.x)",
|
||||||
"From Phone Number / Transmission Path Originating Address (TPOA)": "From Phone Number / Transmission Path Originating Address (TPOA)",
|
"From Phone Number / Transmission Path Originating Address (TPOA)": "From Phone Number / Transmission Path Originating Address (TPOA)",
|
||||||
"gtxMessagingFromHint": "On mobile phones, your recipients sees the TPOA displayed as the sender of the message. Allowed are up to 11 alphanumeric characters, a shortcode, the local longcode or international numbers ({e164}, {e212} or {e214})",
|
"gtxMessagingFromHint": "On mobile phones, your recipients sees the TPOA displayed as the sender of the message. Allowed are up to 11 alphanumeric characters, a shortcode, the local longcode or international numbers ({e164}, {e212} or {e214})",
|
||||||
|
|
Loading…
Reference in a new issue