Skip to content

EventFabric/php-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Event Fabric API Client

PHP implementation of Event Fabric API to send events.

Setup

The library depends on the `http://php.net/curl`_ cURL is a library that lets you make HTTP requests in PHP, install it:

  1. Install curl
  2. Install php-curl
  3. Get Composer
  4. Install dependencies with php composer.phar install
curl -sS https://getcomposer.org/installer | php -- --install-dir=bin

composer.phar install

Usage

see the examples folder for more usage examples

use \EventFabric\Client;
use \EventFabric\Event;

$ef_client = new Client("your_username", "your_password");
$loginResult = $ef_client->login();
$eventResult = $ef_client->send_event(new Event(
            array(
                'text' => 'CPU',
                'percentage' => 80
                ), "your_channel"));

$this->assertTrue($eventResult['ok']);

Test

  1. Get phpunit
  2. Run test using phpunit
phpunit

License

MIT

About

PHP implementation of Event Fabric API to send events

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages