Skip to content

elibom/elibom-php-codeigniter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Elibom PHP - CodeIgniter API Client

==========

A php client of the Elibom REST API. The full API reference is here

Requisites

cURL (apt-get install php5-curl)

Getting stared

  1. Install

    pear install https://github.com/elibom/elibom-php-codeigniter/archive/master.zip

  2. Modify credentials in the file elibom.php located in application/config:

    	// user : email de elibom
    	// token: codigo Api de elibom
    
    	$config['user'] 	= 'xxxxxxxxxxx';
    	$config['token'] 	= 'xxxxxxxxxxx';

    Note: You can find your api password at http://www.elibom.com/api-password (make sure you are logged in).

  3. Create the controller in the folder application/controllers:

    class Sms extends CI_Controller {
    
    	public function __construct() {
    		parent::__construct();
    		$this->load->library('elibom');
    	}
    	public function index()
    	{
    		$sms = $this->elibom->sendMessage('number', 'text');
    	}

    Elibom's library (application/libraries) exposes the following methods:

API Methods

Send SMS

//Return string
$deliveryId = $this->elibom->sendMessage('3201111111','PHP - TEST');

Show Delivery

//Return json object
$delivery = $this->elibom->getDelivery('<delivery_token>');

Schedule SMS

//Return string
$scheduleId  = $this->elibom->scheduleMessage('3201111111', 'Test PHP', 'dd/MM/yyyy hh:mm');

List Scheduled SMS Messages

//Return json array
$scheduledMessages = $this->elibom->getScheduledMessages();

Show Scheduled SMS Message

//Return json object
$schedule = $this->elibom->getScheduledMessage('<schedule_id>');

Cancel Scheduled SMS Message

//Void
$this->elibom->unscheduleMessage('<schedule_id>');

List Users

//Return json array
$users = $this->elibom->getUsers();
foreach($users as $user) {
        echo json_encode($user);
}

Show User

//Return json object
$user = $this->elibom->getUser('<user_id>');

Show Account

//Return json object
$account = $this->elibom->getAccount();

Contributors

Special thanks to the developers who wrote this library:

About

A CodeIgniter client of the elibom REST API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages