benmag/notifyme-plivo

Provides a plivo gateway for NotifyMe

dev-master / 1.0.x-dev 2015-10-30 13:44 UTC

This package is auto-updated.

Last update: 2024-03-29 02:34:07 UTC


README

A Plivo gateway for NotifyMe.

Example

Here is an example of a notification with Plivo:

<?php

// Create a factory for notifications
$notifierFactory = new NotifyMeHQ\NotifyMe\NotifyMeFactory();

// Create the new notification for plivo
$plivoNotifier = $notifierFactory->make([
  // Specify that we will use slack
  'driver' => 'plivo',
  // Who send this message
  'from'   => 'Plivo',
  // Add auth tokens
  'auth_id'  => 'XXXXX',
  'auth_token'  => 'XXXXXXXXXXXXX',
]);

/* @var \NotifyMeHQ\Contracts\ResponseInterface $response */
$response =  $plivoNotifier->notify('1111111111', 'Hi, text from Plivo');

echo $response->isSent() ? 'Message sent' : 'Message going nowhere';

License

NotifyMe is licensed under The MIT License (MIT).