PHP code example of bestit / hipchat-api

1. Go to this page and download the library: Download bestit/hipchat-api library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bestit / hipchat-api example snippets


    HipChat::room('RoomNameOrRoomId')->notify('Some Cool Message');

    // you have three optional parameters, `color`, `alert` and `notify`
    

    HipChat::user('UserEmailOrId')->notify('Some Cool Message');

    // you have two optional parameters, `alert` and `format`
    

$url = 'https://company.hipchat.com'; // Can be left empty, default to https://api.hipchat.com
$token = 'some_api_token';
$client = new \Bestit\HipChat\Client($token, $url);

$client->room('RoomNameOrRoomId')->notify('Some Cool Message');

$client->user('UserEmailOrId')->notify('Some Cool Message');

php artisan vendor:publish --provider HipChatServiceProvider
vendor/bestit/hipchat-api/src/config/hipchat.php