Zae / hipchat by Zae

HipChat API Client
427
2
2
Package Data
Maintainer Username: Zae
Maintainer Contact: ezra@tsdme.nl (Ezra Pool)
Package Create Date: 2014-05-30
Package Last Update: 2014-11-05
Language: PHP
License: MIT
Last Refreshed: 2024-12-11 15:21:51
Package Statistics
Total Downloads: 427
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 2
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

Zae\HipChat

HipChat API Client

This class provides easy access to v1 of the HipChat API:
https://www.hipchat.com/docs/api/

Install

Installation via composer is very easy, simply add the package to your composer.json:

"require": {  
    "zae/hipchat": "*"  
}

Or download the code and add the namespace to your autoloader or simply require() the files.

Usage

Normal:

<?php
$hipchat = new Zae\HipChat\Client();  
$hipchat->sendMessage([  
    'auth_token' => 'XXXXXXXXXXX',  
    'room_id' => XXXX,  
	'from' => 'Zae\HipChat',  
	'notify' => 1,  
	'message' => "This is an example message",  
	'message_format' => 'text'  
]);

Laravel 4 Facade:

<?php
HipChat::sendMessage([  
    'auth_token' => 'XXXXXXXXXXX',  
    'room_id' => XXXX,  
	'from' => 'Zae\HipChat',  
	'notify' => 1,  
	'message' => "This is an example message",  
	'message_format' => 'text'  
]);

About

License

This project has an MIT license. See the LICENSE file for details.

Guzzle 4

The project uses guzzle 4's service descriptions to create an API Client.

Laravel

The project has easy L4 integration using it's ServiceProvider and Facade.

add the ServiceProvider to your list of providers in the config/app file:

'providers' => array(  
	'Zae\HipChat\HipChatServiceProvider'    
)

and the Facade to the list of aliases in the config/app file:

'aliases' => array(  
    'HipChat'v=> 'Zae\HipChat\Facades\HipChat'  
)

Author

Ezra Pool ezra@tsdme.nl

TODO

  • Provide tests
  • Better auth technique?
  • APIv2