2017 © Pedro Peláez
 

library pingdom

A PHP library for dealing with the Pingdom REST API with multiaccount support

image

carlosio/pingdom

A PHP library for dealing with the Pingdom REST API with multiaccount support

  • Thursday, March 28, 2013
  • by carlosbuenosvinos
  • Repository
  • 2 Watchers
  • 5 Stars
  • 44 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 1 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

CarlosIO\Pingdom

Build Status, (*1)

CarlosIO\Pingdom is a Pingdom API written in PHP with multiaccount support. So, if you don't want to pay for a premium account, you can create free ones and integrate them using this API., (*2)

Features

All the Pingdom services are available at http://www.pingdom.com/services/api-documentation-rest, (*3)

Here are the services you can use using this API: * Check * Actions * Contacts * Credits * Probes * ServerTime, (*4)

Installation

The best way to install the library is by using Composer. Add the following to composer.json in the root of your project:, (*5)

``` javascript { "require": { "carlosio/pingdom": "1.*" } }, (*6)


Then, on the command line: ``` bash curl -s http://getcomposer.org/installer | php php composer.phar install

Use the generated vendor/autoload.php file to autoload the library classes., (*7)

Usage

Usage is fairly straightforward. Here is an example:, (*8)

<?php
    require_once __DIR__ . '/../vendor/autoload.php';

    use CarlosIO\Pingdom\Account;
    use CarlosIO\Pingdom\Client;

    $client = new Client();
    $client->addAccount(new Account('<user>', '<password>', '<token>'));

    // As an example...
    $checks = $client->getChecks();
    foreach ($checks as /** @var \CarlosIO\Pingdom\Check $check */ $check) {
        echo $check->getName(), ' (', $check->getHostname(), ')', PHP_EOL;
        echo $check->getStatus(), ' ', $check->getLastResponseTime(), PHP_EOL;
    }

    $actions = $client->getActions();
    foreach ($actions as /** @var \CarlosIO\Pingdom\Action $action */ $action) {
        echo $action->getMessageFull(), ' ', $action->getContactName(), ' ', $action->getVia(), PHP_EOL;
    }

    $contacts = $client->getContacts();
    foreach ($contacts as /** @var \CarlosIO\Pingdom\Contact $contact */ $contact) {
        echo $contact->getName(), ' ', $contact->getEmail(), PHP_EOL;
    }

    $credits = $client->getCredits();
    foreach ($credits as /** @var \CarlosIO\Pingdom\Credit $credit */ $credit) {
        echo $credit->getAvailableChecks(), PHP_EOL;
    }

    $probes = $client->getProbes();
    foreach ($probes as /** @var \CarlosIO\Pingdom\Probe $probe */ $probe) {
        echo $probe->getCountry(), ' ', $probe->getIp(), PHP_EOL;
    }

    $serverTimes = $client->getServerTime();
    foreach ($serverTimes as /** @var \CarlosIO\Pingdom\ServerTime $serverTime */ $serverTime) {
        echo $serverTime->getServerTime(), PHP_EOL;
    }

The Versions

28/03 2013

dev-master

9999999-dev https://github.com/carlosbuenosvinos/php-pingdom-api

A PHP library for dealing with the Pingdom REST API with multiaccount support

  Sources   Download

MIT

The Requires

 

The Development Requires

api pingdom

11/08 2012

1.0.5

1.0.5.0 https://github.com/carlosbuenosvinos/php-pingdom-api

A PHP library for dealing with the Pingdom REST API with multiaccount support

  Sources   Download

MIT

The Requires

 

The Development Requires

api pingdom

10/08 2012

1.0.4

1.0.4.0 https://github.com/carlosbuenosvinos/php-pingdom-api

A PHP library for dealing with the Pingdom REST API with multiaccount support

  Sources   Download

MIT

The Requires

 

The Development Requires

api pingdom

10/08 2012

1.0.3

1.0.3.0 https://github.com/carlosbuenosvinos/php-pingdom-api

A PHP library for dealing with the Pingdom REST API with multiaccount support

  Sources   Download

MIT

The Requires

 

The Development Requires

api pingdom

10/08 2012

1.0.2

1.0.2.0 https://github.com/carlosbuenosvinos/php-pingdom-api

A PHP library for dealing with the Pingdom REST API with multiaccount support

  Sources   Download

MIT

The Requires

 

The Development Requires

api pingdom

10/08 2012

1.0.1

1.0.1.0 https://github.com/carlosbuenosvinos/php-pingdom-api

A PHP library for dealing with the Pingdom REST API with multiaccount support

  Sources   Download

MIT

The Requires

 

The Development Requires

api pingdom

05/08 2012

1.0.0

1.0.0.0 https://github.com/carlosbuenosvinos/php-pingdom-api

A PHP library for dealing with the Pingdom REST API with multiaccount support

  Sources   Download

MIT

The Requires

 

The Development Requires

api pingdom