2017 © Pedro Peláez
 

library guzzle-clickatell

A Guzzle client for interacting with the Clickatell API

image

bluedogtraining/guzzle-clickatell

A Guzzle client for interacting with the Clickatell API

  • Tuesday, May 12, 2015
  • by bluedogtraining
  • Repository
  • 8 Watchers
  • 8 Stars
  • 10,240 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 1 Open issues
  • 10 Versions
  • 1 % Grown

The README.md

guzzle-clickatell

Build Status, (*1)

A PHP 5.3+ client for interacting with the Clickatell HTTP API., (*2)

Installation

Add this to your composer.json by running composer.phar require bluedogtraining/guzzle-clickatell., (*3)

Usage

Create API client

$client = \Bdt\Clickatell\ClickatellClient::factory(array(
    'api_id'   => $apiId,
    'user'     => $user,
    'password' => $password,
));

Authenticate to the API

$client->getCommand('Auth')->execute()->getSessionId();

Ping the API to keep the session ID alive

$client->getCommand('Ping', array('session_id' => $sessionId))->execute();

Send a message

Passing a session_id parameter is optional. If it isn't present the client will use the authentication details provided., (*4)

$result = $client->getCommand('SendMsg', array(
    'to'   => $mobileNumber,
    'text' => $messageContents,
))->execute();

$result->isSuccessful();  // true
$result->getMessageIds(); // array('mobile_number' => 'message_id')

A quicker way to send a message is:, (*5)

$result = $client->sendMessage($mobileNumber, $messageContents); // true|false

Query a message

$client->getCommand('QueryMsg', array(
    'apimsgid' => $messageId,
))->execute()->getStatus();

Running Tests

First, install PHPUnit with composer.phar install --dev, then run ./vendor/bin/phpunit., (*6)

More Reading

The Versions

12/05 2015

dev-master

9999999-dev

A Guzzle client for interacting with the Clickatell API

  Sources   Download

MIT

The Requires

 

The Development Requires

sms guzzle clickatell

12/05 2015

v2.0.5

2.0.5.0

A Guzzle client for interacting with the Clickatell API

  Sources   Download

MIT

The Requires

 

The Development Requires

sms guzzle clickatell

13/06 2013

v2.0.4

2.0.4.0

A Guzzle client for interacting with the Clickatell API

  Sources   Download

MIT

The Requires

 

The Development Requires

sms guzzle clickatell

28/05 2013

v2.0.3

2.0.3.0

A Guzzle client for interacting with the Clickatell API

  Sources   Download

MIT

The Requires

 

The Development Requires

sms guzzle clickatell

15/04 2013

v2.0.2

2.0.2.0

A Guzzle client for interacting with the Clickatell API

  Sources   Download

MIT

The Requires

 

The Development Requires

sms guzzle clickatell

05/03 2013

v2.0.1

2.0.1.0

A Guzzle client for interacting with the Clickatell API

  Sources   Download

MIT

The Requires

 

The Development Requires

sms guzzle clickatell

13/02 2013

v2.0.0

2.0.0.0

A Guzzle client for interacting with the Clickatell API

  Sources   Download

MIT

The Requires

 

The Development Requires

sms guzzle clickatell

07/02 2013

v1.0.2

1.0.2.0

A Guzzle client for interacting with the Clickatell API

  Sources   Download

MIT

The Requires

 

The Development Requires

sms guzzle clickatell

15/01 2013

v1.0.1

1.0.1.0

A Guzzle client for interacting with the Clickatell API

  Sources   Download

MIT

The Requires

 

The Development Requires

sms guzzle clickatell

08/01 2013

v1.0.0

1.0.0.0

A Guzzle client for interacting with the Clickatell API

  Sources   Download

MIT

The Requires

 

The Development Requires

sms guzzle clickatell