0.6.0 • Published 4 months ago

@hugoalh/send-ifttt-webhook v0.6.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

Send IFTTT Webhook (NodeJS)

⚖️ MIT CodeFactor Grade

Release - LatestRelease - Pre
GitHubGitHub Latest Release Version (GitHub Latest Release Date)GitHub Latest Pre-Release Version (GitHub Latest Pre-Release Date)
NPMNPM Latest Release VersionNPM Latest Pre-Release Version

A NodeJS module to send IFTTT webhook.

🔰 Begin

Bun

🧪 Experimental: Bun is still under development.

  • Target Version: ^ v1.0.0, &:
    • TypeScript >= v5.1.0 [Development]
  • Require Permission: N/A
  • Domain/Registry:
    • NPM
      bun add @hugoalh/send-ifttt-webhook[@<Tag>]
      import ... from "@hugoalh/send-ifttt-webhook[@<Tag>]";

ℹ️ Notice: It is also able to import part of the module with sub path if available, see file package.json property exports for available sub paths.

NodeJS

  • Target Version: >= v18.12.0, &:
    • TypeScript >= v5.1.0 [Development]
  • Require Permission: N/A
  • Domain/Registry:
    • NPM
      npm install @hugoalh/send-ifttt-webhook[@<Tag>]
      import ... from "@hugoalh/send-ifttt-webhook";

ℹ️ Notice: It is also able to import part of the module with sub path if available, see file package.json property exports for available sub paths.

🧩 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 IFTTTWebhookStandardPayload {
      value1?: string;
      value2?: string;
      value3?: string;
    }

ℹ️ Notice: Documentation is included inside the script file.

✍️ Example

  • import { IFTTTWebhook } from "@hugoalh/send-ifttt-webhook";
    
    new IFTTTWebhook("my-ifttt-webhook-key").sendArbitrary("test", { message: "Hello, world!" });

🔗 Other Edition

0.6.0

4 months ago

0.4.0

10 months ago

0.5.1

9 months ago

0.3.0

11 months ago

0.2.0

11 months ago

0.1.0

11 months ago