2017 © Pedro Peláez
 

library hipchat-notifier

Hipchat Notifier for PHP

image

mizanur/hipchat-notifier

Hipchat Notifier for PHP

  • Monday, April 10, 2017
  • by mizan3008
  • Repository
  • 1 Watchers
  • 0 Stars
  • 553 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Hipchat Notifier

Super-simple, minimum abstraction HipchatNotifier v2, in PHP., (*1)

Requires PHP 5.3 and a pulse., (*2)

Installation

You can install the hipchat-notifier using Composer:, (*3)

composer require mizanur/hipchat-notifier

or, (*4)

composer require mizanur/hipchat-notifier

HOW TO USER

You can start with .env or without .env, (*5)

With .env, (*6)

We need setup some configuration variable in .env, (*7)

HIPCHAT_DOMAIN=https://example.hipchat.com
HIPCHAT_TOKEN=your-room-token
HIPCHAT_ROOM_ID=your-room-id
HIPCHAT_BOT_NAME=your-bot-name (this one is optional, default bot name is HIP-BOT)

Initialize hipchat notifier, (*8)

$hipchatNotifier = new \HipchatNotifier\HipchatNotifier();

Without .env, (*9)

Initialize hipchat notifier, (*10)

//the last param bot-name is optional, default bot name is HIP-BOT

$hipchatNotifier = new \HipchatNotifier\HipchatNotifier('YOUR-DOMAIN','YOUR-ROOM-ID','YOUR-ROOM-TOKEN', 'BOT-NAME');

Send error notification to your hipchat room, (*11)

//you can pass your color as second param (red or green or yellow) default is red

$hipchatNotifier->notifyError('YOUR ERROR MESSAGE');

//or

$hipchatNotifier->notifyError('YOUR ERROR MESSAGE', 'green');

Send success or info notification to your hipchat room, (*12)

//you can pass your color as second param (red or green or yellow) default is green

$hipchatNotifier->notifyInfo('YOUR MESSAGE');

//or

$hipchatNotifier->notifyInfo('YOUR MESSAGE', 'red');

Send exception notification to your hipchat room, (*13)

//you can pass your color as second param (red or green or yellow) default is red

try{
    #Your code...
}catch(\Exception $ex){
    $hipchatNotifier->notifyException($ex);
}

//or

try{
    #Your code...
}catch(\Exception $ex){
    $hipchatNotifier->notifyException($ex, 'yellow');
}

The Versions

10/04 2017

dev-master

9999999-dev https://github.com/mizanur-rahman/hipchat-notifier.git

Hipchat Notifier for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

by Mizanur Rahman

hipchat-notifier-php

10/04 2017

v1.2

1.2.0.0 https://github.com/mizanur-rahman/hipchat-notifier.git

Hipchat Notifier for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

by Mizanur Rahman

hipchat-notifier-php

10/04 2017

v1.1

1.1.0.0 https://github.com/mizanur-rahman/hipchat-notifier.git

Hipchat Notifier for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

by Mizanur Rahman

hipchat-notifier-php

10/04 2017

v1.0

1.0.0.0 https://github.com/mizanur-rahman/hipchat-notifier.git

Hipchat Notifier for PHP

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

by Mizanur Rahman

hipchat-notifier-php