Send IFTTT Webhook (Deno)
Heat | Release - Latest | Release - Pre | |
---|---|---|---|
| | () | () |
A Deno module to send IFTTT webhook.
đ° Begin
Deno
- Target Version: >= v1.35.0
- Require Permission:
- Network (
allow-net
):maker.ifttt.com
- Network (
- Domain/Registry:
- Deno Land
import ... from "https://deno.land/x/send_ifttt_webhook[@<Tag>]/mod.ts";
- DenoPKG
import ... from "https://denopkg.com/hugoalh-studio/send-ifttt-webhook-deno[@<Tag>]/mod.ts";
- GitHub Raw [Require Tag]
import ... from "https://raw.githubusercontent.com/hugoalh-studio/send-ifttt-webhook-deno/<Tag>/mod.ts";
- Pax
import ... from "https://pax.deno.dev/hugoalh-studio/send-ifttt-webhook-deno[@<Tag>]/mod.ts";
- Deno Land
âšī¸ Notice: Although it is recommended to import main module with path
mod.ts
in general, it is also able to import part of the module with sub path if available, but do not import if:
- it's file path has an underscore prefix (e.g.:
_foo.ts
,_util/bar.ts
), or- it is a benchmark or test file (e.g.:
foo.bench.ts
,foo.test.ts
), or- it's symbol has an underscore prefix (e.g.:
export function _baz() {}
).These elements are not considered part of the public API, thus no stability is guaranteed for them.
𧊠API
class IFTTTWebhook { constructor(key: string | URL, options: IFTTTWebhookOptions = {}): IFTTTWebhook; send(eventName: string, payload: IFTTTWebhookStandardPayload = {}): Promise<Response>; sendArbitrary(eventName: string, payload: JSONValueExtend = {}): Promise<Response>; static send(key: string | URL, eventName: string, payload: IFTTTWebhookStandardPayload = {}): Promise<Response>; static sendArbitrary(key: string | URL, eventName: string, payload: JSONValueExtend = {}): Promise<Response>; }
function sendIFTTTWebhook(key: string | URL, eventName: string, payload: IFTTTWebhookStandardPayload = {}): Promise<Response>;
function sendIFTTTWebhookArbitrary(key: string | URL, eventName: string, payload: JSONValueExtend = {}): Promise<Response>;
interface IFTTTWebhookOptions extends Pick<ExFetchOptions, "retry" | "timeout" | "userAgent"> {}
interface IFTTTWebhookStandardPayload extends JSONObjectExtend { value1?: string; value2?: string; value3?: string; }
âšī¸ Notice: Documentation is included inside the script file, can view it via:
âī¸ Example
import { IFTTTWebhook } from "https://raw.githubusercontent.com/hugoalh-studio/send-ifttt-webhook-deno/main/mod.ts"; await new IFTTTWebhook("my-ifttt-webhook-key").sendArbitrary("test", { message: "Hello, world!" });