Download the PHP package shrimpwagon/digium-switchvox-api without Composer

On this page you can find all versions of the php package shrimpwagon/digium-switchvox-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package digium-switchvox-api

Digium Switchvox API

Build Status Latest Stable Version Total Downloads License

PHP wrapper for the Digium Switchvox API.

Features

This makes simple Switchvox's requests in JSON or XML.

Digium's PHP client library requires a PEAR and PECL package whereas this implementation does not require them.

Usage

$client = new Switchvox\SwitchvoxClient();
$client->user = 'admin';
$client->password = '1234';
$client->uri = 'https://somedigiumendpoint.com';

// By default it will not care if the SSL cert is valid, to change:
$client->strict_ssl = true;

// Timeout in seconds, default is 10 seconds
$client->timeout = 15;

// If JSON is preferred (default):
$client->data_type = 'json';

// If XML is preferred:
$client->data_type = 'xml';

// Request a method with parameters
$params = [
    'sort_field' => 'number',
    'sort_order' => 'ASC',
    'items_per_page' => '9999',
    'page_number' => '1'
];

$response = $client->send('switchvox.directories.getExtensionList', $params);

// Request without parameters
$response = $client->send('switchvox.directories.getInfo');

Notes

The strict_ssl feature correlates to the Httpful\Request timeout.

All Digium Switchvox web service methods can be found here.

The send method returns a Httpful\Response object.

Testing

To run tests in phpunit you must use your own environment variables for user and password:

$ SWITCHVOX_USER=<user> SWITCHVOX_PASSWORD=<password> phpunit -v --debug

For development you can get a free demo Digium Switchbox account.

They will send you a user name and passowrd to your email address.

Once you log into the admin portal take note of the domain name and use that as the uri.

The uri property for this client and the phpunit.xml file is pre-populated with:

https://switchvoxdemo1.digiumcloud.net

Requirements

Installation

Composer

Digium Switchvox API is PSR-0 compliant and can be installed using composer. Simply add shrimpwagon/digium-switchvox-api to your composer.json file. Composer is the sane alternative to PEAR. It is excellent for managing dependencies in larger projects.

{
    "require": {
        "shrimpwagon/digium-switchvox-api": "*"
    }
}

Contributing

Digium Switchvox API highly encourages sending in pull requests. When submitting a pull request please:

Changelog

1.0.0


All versions of digium-switchvox-api with dependencies

PHP Build Version
Package Version
Requires dcarbone/xml-writer-plus Version 0.4.*
nategood/httpful Version ^0.2.20
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package shrimpwagon/digium-switchvox-api contains the following files

Loading the files please wait ....