ragboyjr/pager-duty-client

Pager Duty REST API V2 Client

Installs: 118

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/ragboyjr/pager-duty-client

v0.1.0 2017-07-07 15:48 UTC

This package is auto-updated.

Last update: 2025-09-18 21:40:33 UTC


README

Simple PHP Client for interacting with the Pager Duty API.

Installation

Install with composer at ragboyjr/pager-duty-client-client

Usage

<?php

use Ragboyjr\PagerDuty;

$events = new PagerDuty\GuzzleEventsApiClient(/* pass an optional custom GuzzleHttp\ClientInterface */);

$resp = $events->enqueue($routing_key, PagerDuty\EventsApi::ACTION_TRIGGER, [
    'summary' => 'My Alert Summary',
    'source' => 'sub.host.com',
    'severity' => PagerDuty\EventsApi::SEVERITY_INFO,
]);

if ($resp->isOk()) {
    var_dump($resp->getBody());
} else if ($resp->isError()) {
    var_dump($resp->getStatus());
    var_dump($resp->getBody());
    var_dump($resp->getHttpResponse());
}