2017 © Pedro Peláez
 

library kazoo-php-sdk

Description of project kazoo-php-sdk.

image

2600hz/kazoo-php-sdk

Description of project kazoo-php-sdk.

  • Monday, July 23, 2018
  • by 2600hz
  • Repository
  • 43 Watchers
  • 14 Stars
  • 1,702 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 41 Forks
  • 7 Open issues
  • 20 Versions
  • 3 % Grown

The README.md

PHP Kazoo API

A simple Object Oriented wrapper for Kazoo API, written with PHP5., (*1)

NOTICE: Master is no longer backward compatibile with version 1.x

The master brach of this repo represents a new approach to the SDK, which will become version 2.x., (*2)

If you are currently using the SDK the 1.x branches will be maintained until otherwise notified., (*3)

Features

  • Follows PSR-0 conventions and coding standard: autoload friendly
  • Light and fast thanks to lazy loading of API classes
  • Extensively tested and documented

Requirements

Dependencies for the SDK are managed using Composer. For your convience we have included the composer binary in the root directory of the project., (*4)

However, if you would like to install Composer to your local system you can run (optional):, (*5)

$ curl -s http://getcomposer.org/installer | php

Installing the SDK

NOTICE: These instructions are a work-in-progress. Do you have a better way? Let us know!, (*6)

  • Browse to the GitHub repo for the Kazoo SDK and select the branch which represents the version you wish to use.
  • Click "Download ZIP"
  • Unzip the SDK into your project
  • The SDK follows the PSR-0 convention names for its classes, which means you should be able to easily integrate kazoo-php-sdk class loading in your own autoloader.

Installing the SDK (with Composer)

This assumes basic familiarization with composer. If you have not used Composer before you might read the getting started guide., (*7)

Add the following require line:, (*8)

"2600hz/kazoo-php-sdk": "dev-master"

Using Composer update or install your project dependencies., (*9)

If your project is already including the auto-generated autloader, then you are done!, (*10)

Example Usage

In this example we will find all admins of the account belonging to the authenticated user. It will then set "require_password_update" to true for each admin and save it back to the db., (*11)

<?php

/* Install the library via composer or download the .zip file to your project folder. */
/* This line loads the library */
require_once "vendor/autoload.php";

/* Setup your SDK options, most commonly the Kazoo URL. If not provided defaults to localhost */
$options = array('base_url' => 'http://kazoo-crossbar-url:8000');

/* Get an authentication token using ONE of the provided methods */
// $authToken = new \Kazoo\AuthToken\None(); /* must have IP auth enabled on Kazoo */
// $authToken = new \Kazoo\AuthToken\ApiKey('XXXXX');
$authToken = new \Kazoo\AuthToken\User('username', 'password', 'sip.realm');

$sdk = new \Kazoo\SDK($authToken, $options);

$filter = array('filter_priv_level' => 'admin');
$users = $sdk->Account()->Users($filter);
foreach ($users as $element) {
    $admin = $element->fetch();
    $admin->require_password_update = true;
    $admin->save();
}

This is a basic example, from $sdk object you can access the full power of Kazoo!, (*12)

Check out the examples for more!

#, (*13)

To see the lastest Unit testing and great examples of functions that were tested, see:

/kazoo-php-sdk/lib/hz2600/Kazoo/Tests/Functional

We need your help with version 2.x

  • Version 2.x of the SDK needs to have the Entity and Collection classes for each Kazoo API built, with unit tests
  • We need to create documentation
  • We need testers!

Interested? Heres how to get started! * Install your favorite webserver with PHP 5.3.2+ * Clone the SDK from your fork to your webserver directory, in this example we will use:, (*14)

$ cd /var/www/html/
$ git clone git@github.com:{YOUR_GITHUB_ORGANIZATION}/kazoo-php-sdk.git
  • Create a new branch for your changes
$ git branch -b MY-FEATURE-BRANCH
  • Make changes!
  • Commit the changes
$ git add .
$ git commit -m 'added the XXX API'
$ git push origin MY-FEATURE-BRANCH
  • Login to GitHub, and your should have a "Compare & pull request" button on fork. Follow the instructions provided by that tool!

Documentation

See the doc directory for more detailed documentation., (*15)

Credits

Contributors

Thanks to GitHub for the high quality API and documentation., (*16)

The Versions

23/07 2018

dev-master

9999999-dev http://github.com/2600hz/kazoo-php-sdk

Description of project kazoo-php-sdk.

  Sources   Download

MIT

The Requires

 

The Development Requires

api voip kazoo sip uc

05/04 2018

dev-adding-resellers

dev-adding-resellers http://github.com/2600hz/kazoo-php-sdk

Description of project kazoo-php-sdk.

  Sources   Download

MIT

The Requires

 

The Development Requires

api voip kazoo sip uc

20/03 2018

dev-formatter

dev-formatter http://github.com/2600hz/kazoo-php-sdk

Description of project kazoo-php-sdk.

  Sources   Download

MIT

The Requires

 

The Development Requires

api voip kazoo sip uc

20/03 2018

dev-conf-dial

dev-conf-dial http://github.com/2600hz/kazoo-php-sdk

Description of project kazoo-php-sdk.

  Sources   Download

MIT

The Requires

 

The Development Requires

api voip kazoo sip uc

02/02 2018

dev-lazedo-patch-1

dev-lazedo-patch-1 http://github.com/2600hz/kazoo-php-sdk

Description of project kazoo-php-sdk.

  Sources   Download

MIT

The Requires

 

The Development Requires

api voip kazoo sip uc

02/02 2018

dev-conference_dial

dev-conference_dial http://github.com/2600hz/kazoo-php-sdk

Description of project kazoo-php-sdk.

  Sources   Download

MIT

The Requires

 

The Development Requires

api voip kazoo sip uc

01/02 2018

dev-config-change

dev-config-change http://github.com/2600hz/kazoo-php-sdk

Description of project kazoo-php-sdk.

  Sources   Download

MIT

The Requires

 

The Development Requires

api voip kazoo sip uc

01/02 2018

2.0.x-dev

2.0.9999999.9999999-dev http://github.com/2600hz/kazoo-php-sdk

Description of project kazoo-php-sdk.

  Sources   Download

MIT

The Requires

 

The Development Requires

api voip kazoo sip uc

01/02 2018

2.0.1

2.0.1.0 http://github.com/2600hz/kazoo-php-sdk

Description of project kazoo-php-sdk.

  Sources   Download

MIT

The Requires

 

The Development Requires

api voip kazoo sip uc

25/01 2018

2.0.0

2.0.0.0 http://github.com/2600hz/kazoo-php-sdk

Description of project kazoo-php-sdk.

  Sources   Download

MIT

The Requires

 

The Development Requires

api voip kazoo sip uc

29/11 2017

dev-sub-account-wip

dev-sub-account-wip http://github.com/2600hz/kazoo-php-sdk

Description of project kazoo-php-sdk.

  Sources   Download

MIT

The Requires

 

The Development Requires

api voip kazoo sip uc

30/03 2017

dev-protocol_logger

dev-protocol_logger http://github.com/2600hz/kazoo-php-sdk

Description of project kazoo-php-sdk.

  Sources   Download

MIT

The Requires

 

The Development Requires

api voip kazoo sip uc

19/10 2016

dev-fix_ring_group_helper

dev-fix_ring_group_helper http://github.com/2600hz/kazoo-php-sdk

Description of project kazoo-php-sdk.

  Sources   Download

MIT

The Requires

 

The Development Requires

api voip kazoo sip uc

22/07 2016

dev-system_configs

dev-system_configs http://github.com/2600hz/kazoo-php-sdk

Description of project kazoo-php-sdk.

  Sources   Download

MIT

The Requires

 

The Development Requires

api voip kazoo sip uc

05/02 2015

1.1.x-dev

1.1.9999999.9999999-dev http://github.com/2600hz/kazoo-php-sdk

Description of project kazoo-php-sdk.

  Sources   Download

MIT

The Requires

 

The Development Requires

api voip kazoo sip uc

01/12 2014

dev-webinar

dev-webinar http://github.com/2600hz/kazoo-php-sdk

Description of project kazoo-php-sdk.

  Sources   Download

MIT

The Requires

 

The Development Requires

api voip kazoo sip uc

09/09 2014

1.0.x-dev

1.0.9999999.9999999-dev http://github.com/2600hz/kazoo-php-sdk

Description of project kazoo-php-sdk.

  Sources   Download

MIT

The Requires

 

The Development Requires

api voip kazoo sip uc

09/09 2014

1.0.1

1.0.1.0 http://github.com/2600hz/kazoo-php-sdk

Description of project kazoo-php-sdk.

  Sources   Download

MIT

The Requires

 

The Development Requires

api voip kazoo sip uc

08/09 2014

1.1.0

1.1.0.0 http://github.com/2600hz/kazoo-php-sdk

Description of project kazoo-php-sdk.

  Sources   Download

MIT

The Requires

 

The Development Requires

api voip kazoo sip uc

17/12 2013

1.0.0

1.0.0.0 http://github.com/2600hz/kazoo-php-sdk

Description of project kazoo-php-sdk.

  Sources   Download

MIT

The Requires

 

The Development Requires

api voip kazoo sip uc