statusio/statusio-php
Composer 安装命令:
composer require statusio/statusio-php
包简介
Status.io API for PHP
README 文档
README
PHP Package for Status.io
Installation
composer require statusio/statusio-php
Usage
use Statusio\StatusioClient; $api = new StatusioClient('<api_id>', '<api_key>'); $result = $api->StatusSummary('<statuspage_id>'); var_dump($result);
View the full API documentation at: http://developers.status.io/
Methods
$api->ComponentList($statuspage_id) $api->ComponentStatusUpdate($statuspage_id, $component, $container, $details, $current_status) $api->IncidentList($statuspage_id) $api->IncidentListByID($statuspage_id) $api->IncidentMessage($statuspage_id, $message_id) $api->IncidentSingle($statuspage_id, $incident_id) $api->IncidentCreate($statuspage_id, $incident_name, $incident_details, $infrastructure_affected, $current_status, $current_state, $notifications = 0, $all_infrastructure_affected = "0", $message_subject = "Status Notification") $api->IncidentUpdate($statuspage_id, $incident_id, $incident_details, $current_status, $current_state, $notifications = 0, $message_subject = "Status Notification") $api->IncidentResolve($statuspage_id, $incident_id, $incident_details, $current_status, $current_state, $notifications = 0, $message_subject = "Status Notification") $api->IncidentDelete($statuspage_id, $incident_id) $api->MaintenanceList($statuspage_id) $api->MaintenanceListByID($statuspage_id) $api->MaintenanceMessage($statuspage_id, $message_id) $api->MaintenanceSingle($statuspage_id, $maintenance_id) $api->MaintenanceSchedule($statuspage_id, $maintenance_name, $maintenance_details, $infrastructure_affected, $date_planned_start, $time_planned_start, $date_planned_end, $time_planned_end, $automation = "0", $all_infrastructure_affected = "0", $maintenance_notify_now = "0", $maintenance_notify_1_hr = "0", $maintenance_notify_24_hr = "0", $maintenance_notify_72_hr = "0", $message_subject = "Maintenance Notification") $api->MaintenanceStart($statuspage_id, $maintenance_id, $maintenance_details, $notifications = 0, $message_subject = "Maintenance Notification") $api->MaintenanceUpdate($statuspage_id, $maintenance_id, $maintenance_details, $notifications = 0, $message_subject = "Maintenance Notification") $api->MaintenanceFinish($statuspage_id, $maintenance_id, $maintenance_details, $notifications = 0, $message_subject = "Maintenance Notification") $api->MaintenanceDelete($statuspage_id, $maintenance_id) $api->MetricUpdate($statuspage_id, $metric_id, $day_avg, $day_start, $day_dates, $day_values, $week_avg, $week_start, $week_dates, $week_values, $month_avg, $month_start, $month_dates, $month_values) $api->StatusSummary($statuspage_id) $api->SubscriberList($statuspage_id) $api->SubscriberAdd($statuspage_id, $method, $address, $silent = '1', $granular = '') $api->SubscriberUpdate($statuspage_id, $subscriber_id, $address, $granular = '') $api->SubscriberRemove($statuspage_id, $subscriber_id)
Constants
Predefined constants and notification setup based on bitmask
$result = $api->IncidentCreate( '<statuspage_id>', 'Incident name', 'Incident details', ['<component_id>-<container_id>'], StatusioClient::STATUS_OPERATIONAL, StatusioClient::STATE_IDENTIFIED, StatusioClient::NOTIFY_EMAIL + StatusioClient::NOTIFY_SMS // equal to 'notify_email' = 1, 'notify_sms' = 1 and all other notifications = 0 );
So if you want to notify users by Slack and Twitter should set $notifications parameter equal to StatusioClient::NOTIFY_SLACK + StatusioClient::NOTIFY_SOCIAL.
To disable all notifications just set parameter equal to 0.
Full list of constants
StatusioClient::STATUS_OPERATIONAL; StatusioClient::STATUS_DEGRADED_PERFORMANCE; StatusioClient::STATUS_PARTIAL_SERVICE_DISRUPTION; StatusioClient::STATUS_SERVICE_DISRUPTION; StatusioClient::STATUS_SECURITY_EVENT; StatusioClient::STATE_INVESTIGATING; StatusioClient::STATE_IDENTIFIED; StatusioClient::STATE_MONITORING; StatusioClient::NOTIFY_EMAIL; StatusioClient::NOTIFY_SMS; StatusioClient::NOTIFY_WEBHOOK; StatusioClient::NOTIFY_SOCIAL; StatusioClient::NOTIFY_IRC; StatusioClient::NOTIFY_HIPCHAT; StatusioClient::NOTIFY_SLACK; StatusioClient::NOTIFY_MSTEAMS;
statusio/statusio-php 适用场景与选型建议
statusio/statusio-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 53.36k 次下载、GitHub Stars 达 7, 最近一次更新时间为 2016 年 01 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「status page」 「statusio」 「status.io」 「status io」 「status system」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 statusio/statusio-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 statusio/statusio-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 statusio/statusio-php 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Serves functionality of healthchecks of your application
DataTables is a plug-in for the jQuery Javascript library. It is a highly flexible tool, based upon the foundations of progressive enhancement, which will add advanced interaction controls to any HTML table.
Doctrine implementation of the MetaborStd (Statemachine) for PHP 8.2+
Plug-ins for DataTables
404 'not found' and 403 'forbidden' error handlers. The 404 handler shows custom content for missing pages but not resources like CSS or JS. The 403 handler redirects to a login URL on unauthorized access.
This package helps you use bitwise enums in PHP and Laravel.
统计信息
- 总下载量: 53.36k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 23
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2016-01-08