Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ragboyjr/pager-duty-client-php

Pager Duty API Client for PHP
https://github.com/ragboyjr/pager-duty-client-php

api-client guzzlehttp pager-duty

Last synced: 26 days ago
JSON representation

Pager Duty API Client for PHP

Awesome Lists containing this project

README

        

# Pager Duty API Client

Simple PHP Client for interacting with the Pager Duty API.

## Installation

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

## Usage

```php
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());
}
```