verifiedjoseph/ntfy-php-library

PHP 库,用于与 Ntfy 服务器交互


README

Latest Version Software License Codecov

使用 ntfy 服务器发送消息的 PHP 库。

支持 ntfy 服务器版本 2。

安装

composer require verifiedjoseph/ntfy-php-library

快速入门

require __DIR__ . '/vendor/autoload.php';

use Ntfy\Server;
use Ntfy\Message;
use Ntfy\Client;

$server = new Server('https://ntfy.sh/');

$message = new Message();
$message->topic('mytopic');
$message->title('Hello World');
$message->body('Hello World from ntfy.sh');
$message->priority(Message::PRIORITY_HIGH);

$client = new Client($server);
$client->send($message);

文档

需求

  • PHP >= 8.1
  • Composer
  • PHP 扩展

依赖

guzzlehttp/guzzle

变更日志

本项目所有显著变更均记录在 CHANGELOG 中。

许可证

MIT 许可证。更多信息请参阅 LICENSE