phputil/flags-webhooks

phputil/flags 框架的 Webhooks

v0.1.1 2024-06-02 00:07 UTC

This package is auto-updated.

Last update: 2024-09-02 00:45:08 UTC


README

Version Build License PHP

phputil/flags 框架提供 Webhooks。

安装

PHP 7.4 或更高版本。它使用 Guzzle 来发送 HTTP 请求。

composer require phputil/flags-webhooks

使用方法

require_once 'vendor/autoload.php';

use \phputil\flags\webhooks\WebhookListener;

$listener = new WebhookListener( 'https://example.com' );

// Now let's use it with the framework
$flags = new \phputil\flags\FlagManager();
$flags->getListeners()->add( $listener );

// Notifying
$flags->enable( 'foo' ); // POST request (creation)
$flags->disable( 'foo' ); // PUT request (update)
$flags->remove( 'foo' ); // DELETE request (removal)

文档

即将推出

许可证

MIT © Thiago Delgado Pinto