cronguard/cronguard-php
最新稳定版本:v1.0.0
Composer 安装命令:
composer require cronguard/cronguard-php
包简介
Oficial PHP SDK para Cronguard API
README 文档
README
The PHP SDK for the Cronguard API.
Installation
You can install the package via composer:
composer require cronguard/cronguard-php
Requirements
- PHP 8.1 or higher
- Guzzle HTTP Client
Basic Usage
Instantiate the client with your API key:
use Cronguard\Client; $client = new Client('YOUR_API_KEY');
Ping
You can ping a monitor using its UUID:
$client->ping('MONITOR_UUID');
Monitors
List all monitors:
$monitors = $client->monitors()->list();
Create a new monitor:
// Name, Period (seconds), Grace (seconds) $newMonitor = $client->monitors()->create('Backup Database', 3600, 300);
Get a specific monitor:
$monitor = $client->monitors()->get('MONITOR_ID');
Update a monitor:
$client->monitors()->update('MONITOR_ID', [ 'name' => 'New Name', 'period_seconds' => 7200 ]);
Delete a monitor:
$client->monitors()->delete('MONITOR_ID');
Get monitor events:
$events = $client->monitors()->events('MONITOR_ID');
Notifications
List notifications (paginated):
$notifications = $client->notifications()->list(page: 1);
Testing
To run the tests:
./vendor/bin/phpunit
License
MIT
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-05