verifiedjoseph/gotify-api-php

使用Gotify REST-API与Gotify服务器交互的PHP库。


README

Latest Version Software License

使用Gotify服务器并通过Gotify REST-API进行交互的PHP库。

支持Gotify服务器版本2.5.0。

安装

composer require verifiedjoseph/gotify-api-php

快速开始

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

use Gotify\Server;
use Gotify\Auth\Token;
use Gotify\Endpoint\Message;

// Set server
$server = new Server('https://gotify.example.com/');

// Set application token
$auth = new Token('ApplicationTokenHere');

// Create a message class instance
$message = new Message($server, $auth);

// Send a message
$message->create(
  title: 'hello?',
  message: 'Hello World',
  priority: Message::PRIORITY_HIGH,
);

文档

要求

  • PHP >= 8.1
  • Composer
  • PHP扩展

依赖

guzzlehttp/guzzle

变更日志

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

许可证

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