Giter Club home page Giter Club logo

jusibe-php-lib's Introduction

jusibe-php-lib

Latest Stable Version License Build Status Coveralls Quality Score Total Downloads

Jusibe Library for PHP

Installation

PHP 5.4+ or HHVM 3.3+, and Composer are required.

To get the latest version of jusibe-php-lib, simply add the following line to the require block of your composer.json file.

"unicodeveloper/jusibe-php-lib": "1.0.*"

You'll then need to run composer install or composer update to download it and have the autoloader updated.

Usage

Available methods for use are:

/**
 * Send SMS using the Jusibe API
 * @param  array $payload
 * @return object
 */
$jusibe->sendSMS($payload)->getResponse();

/**
 * Check the available SMS credits left in your Jusibe account
 * @return object
 */
$jusibe->checkAvailableCredits()->getResponse();

/**
 * Check the delivery status of a sent SMS
 * @param  string $messageID
 * @return object
 */
$jusibe->checkDeliveryStatus('8nb1wrgdjw')->getResponse();

Send an SMS

<?php

// include your composer dependencies
require_once 'vendor/autoload.php';

use Unicodeveloper\Jusibe\Jusibe;

$publicKey = 'xxxxxxxxxxxxxx';
$accessToken = 'xxxxxxxxxxxxxx';

$jusibe = new Jusibe($publicKey, $accessToken);

$message = "I LOVE YOU, BABY";

$payload = [
    'to' => '7079740987',
    'from' => 'PROSPER DATING NETWORK',
    'message' => $message
];

try {
    $response = $jusibe->sendSMS($payload)->getResponse();
    print_r($response);
} catch(Exception $e) {
    echo $e->getMessage();
}

Response Info for Developer

SendSMS Response

Check SMS Credits

<?php

// include your composer dependencies
require_once 'vendor/autoload.php';

use Unicodeveloper\Jusibe\Jusibe;

$publicKey = 'xxxxxxxxxxxxxx';
$accessToken = 'xxxxxxxxxxxxxx';

$jusibe = new Jusibe($publicKey, $accessToken);

try {
   $response = $jusibe->checkAvailableCredits()->getResponse();
   print_r($response);
} catch(Exception $e) {
    echo $e->getMessage();
}

Response Info for Developer

Check SMS Credits Response

Check Delivery Status

<?php

// include your composer dependencies
require_once 'vendor/autoload.php';

use Unicodeveloper\Jusibe\Jusibe;

$publicKey = 'xxxxxxxxxxxxxx';
$accessToken = 'xxxxxxxxxxxxxx';

$jusibe = new Jusibe($publicKey, $accessToken);

try {
    $response = $jusibe->checkDeliveryStatus('8nb1wrgdjw')->getResponse();
    print_r($response);
} catch(Exception $e) {
    echo $e->getMessage();
}

Response Info for Developer

Check Delivery Status Response

Contributing

Please feel free to fork this package and contribute by submitting a pull request to enhance the functionalities.

How can I thank you?

Why not star the github repo? I'd love the attention! Why not share the link for this repository on Twitter or HackerNews? Spread the word!

Don't forget to follow me on twitter!

Thanks! Prosper Otemuyiwa.

License

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

jusibe-php-lib's People

Contributors

unicodeveloper avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.