rcrowe / hippy
PHP client for HipChat. Designed for incidental notifications from an application.
Installs: 14 782
Dependents: 1
Suggesters: 0
Security: 0
Stars: 50
Watchers: 5
Forks: 11
Open Issues: 1
Requires
- php: >=5.3.2
- guzzle/guzzle: ~3.8.0
Requires (Dev)
This package is auto-updated.
Last update: 2024-10-29 04:19:53 UTC
README
Hippy is a simple PHP client for sending messages to a HipChat room. It is designed for incidental notifications from an application.
Hippy does one thing and one thing well, sending messages to a Hipchat room.
Installation
Add rcrowe\hippy
as a requirement to composer.json:
{ "require": { "rcrowe/hippy": "0.6.*" } }
Update your packages with composer update
or install with composer install
.
Usage
$transport = new rcrowe\Hippy\Transport\Guzzle($token, $room, $from); $hippy = new rcrowe\Hippy\Client($transport); $message = new rcrowe\Hippy\Message(true, rcrowe\Hippy\Message::BACKGROUND_YELLOW); $message->setText('test'); $hippy->send($message);
Hippy also provides a static interface just like v0.5 and below.
use rcrowe\Hippy\Facade as Hippy; Hippy::init($token, $room, $from); Hippy::html('<a href="#">test failed</a>');
Maybe you want to add the message to a queue and send it at the end.
Hippy::init($token, $room, $from); Hippy::add('test 1'); Hippy::addHtml('test 2'); Hippy::go();
Phing
Use Phing for builds and want to send messages to Hipchat? Then checkout out phing-hipchat.
Tests
To run all tests
$> phpunit tests
License
Hippy is released under the MIT public license.