Skip to content

Danno040/statuspage-sdk-php

 
 

Repository files navigation

StatusPage.io PHP SDK

Latest Stable Version Build Status Scrutinizer Quality Score Code Coverage

A PHP SDK for StatusPage.io

Requirements

  • PHP 5.3.3+
  • PHP cURL extension with SSL enabled (it's usually built-in).

Instalation

The recommended way to install StatusPage SDK for PHP is through Composer.

$ cd /path/to/your/project
$ composer require statuspage/statuspage-sdk-php:~0.1

Usage

<php

use Guzzle\Http\Client as GuzzleClient;
use StatusPage\SDK\Client;
use StatusPage\SDK\Subscribers\Subscriber;

$client = new Client(new GuzzleClient, 'YOUR_PAGE_ID', 'YOUR_SECRET_KEY');

$subscriber = new Subscriber;
$subscriber->setEmail('[email protected]');

$client->subscribers()->addSubscriber($subscriber);
<php

use Guzzle\Http\Client as GuzzleClient;
use StatusPage\SDK\Client;

$client = new Client(new GuzzleClient, 'YOUR_PAGE_ID', 'YOUR_SECRET_KEY');
$client->metrics()->submitData('YOUR_METRIC_ID', time(), mt_rand(1, 100));

Additional resources

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published