2017 © Pedro Peláez
 

library octopush-sdk

Php SDK for octopush API SMS

image

franckysolo/octopush-sdk

Php SDK for octopush API SMS

  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 38 % Grown

The README.md

Octopush-sdk

Latest Stable Version Total Downloads Latest Unstable Version License composer.lock available, (*1)

Php SDK for Octopush API SMS, (*2)

Installation

composer require franckysolo/octopush-sdk

tests

Create a env.php file in tests/config, (*3)

To run tests, (*4)

composer test

Usages

Config

Create a app.php file in configs directory, (*5)

Get Credit

getCredit();
?>


Remaining Credit :  

Get Balance

getBalance();
$premium = $api->getPremiumBalance();
$low = $api->getLowCostBalance();
?>


  

  Remaining Sms Low cost :  

  Remaining Sms Premium :  

Send a simple message

sendMessage($message, [
  'sms_recipients' => TEST_PHONE_NUMBER,
  'sms_text' => $message,
  'sms_type' => Message::SMS_PREMIUM,
  'sms_sender' => 'Octopush sdk'
]);
?>


getClient()->getResponse());?>

Send a publipostage message

<?php
require_once '../vendor/autoload.php';
require_once '../configs/app.php';

use Octopush\Api;

$api = new Api(OCTOPUSH_LOGIN, OCTOPUSH_API_KEY);
$message = 'Hello {ch1} {nom} {prenom}, your session begin at {ch2} the {ch3}';

$api->sendMessage($message, [
  'sms_recipients' => [TEST_PHONE_NUMBER, TEST_PHONE_NUMBER_ALT],
  'sms_text' => $message,
  'sms_type' => Message::SMS_PREMIUM,
  'sms_sender' => 'Octopush sdk',
  'request_mode' => Message::SIMULATION_MODE,
  'recipients_first_names' => ['John', 'Jane'],
  'recipients_last_names' => ['John', 'Jane'],
  'sms_fields_1' => ['Mr', 'Miss'],
  'sms_fields_2' => ['08:00 am', '01:00 pm'],
  'sms_fields_3' => ['2018/05/21', '2018/05/22'],
]);

The Versions

03/05 2018

dev-master

9999999-dev

Php SDK for octopush API SMS

  Sources   Download

MIT

The Requires

  • php ^7.1.3

 

The Development Requires

php sms octopush

03/05 2018

v1.0.2

1.0.2.0

Php SDK for octopush API SMS

  Sources   Download

MIT

The Requires

  • php ^7.1.3

 

The Development Requires

php sms octopush

26/04 2018

v1.0.1

1.0.1.0

Php SDK for octopush API SMS

  Sources   Download

MIT

The Requires

  • php ^7.1.3

 

The Development Requires

php sms octopush

25/04 2018

v1.0.0

1.0.0.0

Php SDK for octopush API SMS

  Sources   Download

MIT

The Requires

  • php ^7.1.3

 

The Development Requires

php sms octopush

23/04 2018

v1.0.0-beta

1.0.0.0-beta

Php SDK for octopush API SMS

  Sources   Download

MIT

The Requires

  • php ^7.1.3

 

The Development Requires

php sms octopush