2017 © Pedro Peláez
 

library chatty

image

manavo/chatty

  • Friday, April 8, 2016
  • by manavo
  • Repository
  • 2 Watchers
  • 1 Stars
  • 3,883 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Chatty

A library to send messages to different group chat services (Slack, HipChat)., (*1)

It can easily be used to send notifications about what's happening in your app (user signed up, etc), (*2)

Authors

Philip Manavopoulos., (*3)

Installation

Install via Composer, (*4)

composer require manavo/chatty

Services

Supported services at the moment are:, (*5)

  • Slack
  • HipChat

Usage

Slack

$slackUrl = 'https://my.slack.com/services/hooks/incoming-webhook?token=XXXXXXXXXX';
$slackParams = array(
    'url' => $slackUrl,
    'username' => 'Chatty',
    'icon' => 'https://www.crystalvaults.com/images/bagua-square.gif',
);

$chatty = new \Manavo\Chatty\Sender(new \Manavo\Chatty\MessageHandlers\Slack($slackParams));
$chatty->send($message);

HipChat

$hipchatParams = array(
    'token' => '123456789123456789',
    'room_id' => 'Notifications',
    'from' => 'Chatty',
    'color' => 'random',
    'notify' => 0,
);

$chatty = new \Manavo\Chatty\Sender(new \Manavo\Chatty\MessageHandlers\Hipchat($hipchatParams));
$chatty->send($message);

Custom handler

class MyHandler implements \Manavo\Chatty\Interfaces\MessageHandlerInterface {

    public function handle($message)
    {
        echo $message.PHP_EOL;
    }

}

$chatty = new \Manavo\Chatty\Sender(new MyHandler());
$chatty->send($message);

The Versions

08/04 2016

dev-master

9999999-dev http://github.com/manavo/chatty

  Sources   Download

MIT

The Requires

 

The Development Requires

by Philip Manavopoulos

08/04 2016

0.0.5

0.0.5.0 http://github.com/manavo/chatty

  Sources   Download

MIT

The Requires

 

The Development Requires

by Philip Manavopoulos

01/02 2016

0.0.4

0.0.4.0 http://github.com/manavo/chatty

  Sources   Download

MIT

The Requires

 

The Development Requires

by Philip Manavopoulos

01/02 2016

0.0.3

0.0.3.0 http://github.com/manavo/chatty

  Sources   Download

MIT

The Requires

 

The Development Requires

by Philip Manavopoulos

01/02 2016

0.0.2

0.0.2.0 http://github.com/manavo/chatty

  Sources   Download

MIT

The Requires

 

The Development Requires

by Philip Manavopoulos

12/11 2014

0.0.1

0.0.1.0 http://github.com/manavo/chatty

  Sources   Download

MIT

The Requires

 

The Development Requires

by Philip Manavopoulos