rumd3x/ifttt-webhook 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rumd3x/ifttt-webhook

Composer 安装命令:

composer require rumd3x/ifttt-webhook

包简介

Adapter for IFTTT webhook service

README 文档

README

Adapter for IFTTT webhook service.

This library is in compliance with Rumd3x Standards for notification services.

Install

composer require rumd3x/ifttt-webhook

Usage

<?php
require 'vendor/autoload.php';

use Rumd3x\IFTTT\Event;
use Rumd3x\IFTTT\Trigger;

/**
 * Create event object passing the name of the
 * event, like "button_pressed" or "front_door_opened"
 *
 * With an optional JSON body of:
 * { "value1" : "", "value2" : "", "value3" : "" }
 *
 * The data is completely optional, and you can also
 * This content will be passed on to the Action in your Recipe.
 *
 * Use Any of the syntaxes below:
**/
$event = new Event('event_name');

$event->withValue1('value1')->withValue2('value2')->withValue3('value3');

$event = $event->withValue2('value2');
$event->withValue3('value3');
$event->withValue1('value1');

/**
 * Create the trigger object by passing your IFTTT Webhook Key.
 *
 * And then call the notify method passing the event
 * object to the trigger object and get the response.
 *
 * You can optinally add a delay number in seconds
 * before the request is made
 *
 * Use any of the syntaxes below:
**/
$trigger = new Trigger('your-webhook-key');

$response = $trigger->notify($event);

$response = $trigger->withDelay(10)->notify($event);

$trigger->withDelay(10);
$response = $trigger->notify($event);

$trigger = $trigger->withDelay(10);
$response = $trigger->notify($event);

统计信息

  • 总下载量: 145
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-05-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固