PHP Cloud Rebue Bulk sms API SDK

v1.0.3 2023-01-02 16:37 UTC

This package is auto-updated.

Last update: 2024-08-30 01:17:50 UTC


README

Latest Version on Packagist Software License Total Downloads

This PHP SDK provides convenient methods for consuming CloudRebue API.

Documentation

CloudRebue API Documentation can be found at https://developers.cloudrebue.co.ke

Install

Via Composer (recommended)

$ composer require cloudrebue/api

Via Download

1. Clone or Download this Repo.
2. run `composer install` in the root of the project

Usage

Sending a Message

Detailed samples can be obtained from examples folder

<?php
//include if your project wasent initialized with composer prior to downloading.
//ensure path to vendor is correct
require_once 'vendor/autoload.php';

use CloudRebue\Api\CloudRebue;
use CloudRebue\Api\Models\Sms;

$instance = new CloudRebue("TOKEN_string");

//create an Sms Object
$sms= new Sms("CLOUD_REBUE", "0708361797", "Test Message 1", "101");

//send Sms object
$response = $instance->sendSMS($sms);

var_dump($response);

Sending Messages in batches

<?php
//include if your project wasent initialized with composer prior to downloading.
//ensure path to vendor is correct
require_once 'vendor/autoload.php';

use CloudRebue\Api\CloudRebue;
use CloudRebue\Api\Models\Sms;

$instance = new CloudRebue("TOKEN_string");

//create multiple Sms Object(s)
$sms1= new Sms("CLOUD_REBUE", "0708361797", "Test Message 1", "101");
$sms2 = new Sms("BizTxt", "0735343603"", "Test Message 2", "102");

//send Sms object
$response = $instance->sendBatchSMS($sms1, $sms2);

var_dump($response);

Available Methods are:

  1. sendSMS()
  2. sendBatchSMS()
  3. sendVoiceSMS()
  4. sendBatchVoiceSMS()
  5. accountBalance()
  6. accountTopUp()

Change log

Please see CHANGELOG for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please email edwardmuss5@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.