mannew / hipchat-bundle
Bundle to integrate the HipChat PHP library for their REST API.
Installs: 37 778
Dependents: 1
Suggesters: 0
Security: 0
Stars: 9
Watchers: 3
Forks: 5
Open Issues: 1
Requires
- hipchat/hipchat-php: ~1.4
- symfony/framework-bundle: ~2.1|~3.0
Requires (Dev)
- symfony/console: ~2.1|~3.0
Suggests
- symfony/console: To get HipChat commands
Conflicts
- symfony/console: <2.1|>=4.0
README
A wrapper around the HipChat PHP library, for accessing the HipChat REST API.
Installation
Download using composer
To install using composer, add the following to your composer.json:
{ "require": { "mannew/hipchat-bundle": "*" } }
Enable the bundle
Enable the bundle by adding it to the application kernel.
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Mannew\HipchatBundle\MannewHipchatBundle(), ); } ?>
Configure the bundle
Update your config.yml to contain the a section for this bundle.
mannew_hipchat: auth_token: YOUR_HIPCHAT_AUTH_TOKEN_HERE verify_ssl: true # optional proxy_address: ~ # optional request_timeout: 15 # in seconds, optional
Usage
The bundle provides the DIC with a service named hipchat. To access this service you can use:
<?php $hipChat = $this->container->get('hipchat');
The bundle also provides the following commands:
# send messages from the command
$ app/console hipchat:send:message --room='Room name' 'Message content' 'Sender name' --color=red
# set the room topic
$ app/console hipchat:set:room:topic 'Room name' 'new topic' 'Sender name'
Further reading
The service is an instance of the HipChat\HipChat class from the HipChat PHP library.