library edgeapi
A PHP wrapper for the EdgeOS API
primeinc/edgeapi
A PHP wrapper for the EdgeOS API
- Thursday, June 18, 2015
- by primeinc
- Repository
- 3 Watchers
- 1 Stars
- 1 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 1 Forks
- 0 Open issues
- 2 Versions
- 0 % Grown
EdgeAPI
A PHP wrapper for the EdgeOS API, (*1)
Installation
-
Use Composer to install EdgeAPI into your project:, (*2)
composer require primeinc/edgeapi
-
Setup the endpoint and guzzle client, (*3)
//create new endpoint config, with required info
$endpoint = new \PrimeInc\EdgeApi\Endpoint(array(
'protocol' => 'https',
'domain' => '192.168.1.1',
'port' => '443',
'username' => 'ubnt',
'password' => 'ubnt',
// don't have a valid cert? set the following to false
'verify' => true
));
$client = new \PrimeInc\EdgeApi\Client($endpoint);
$client->data('sys_info');
echo $client->prettyJson(); // this will grab the last data fetched automatically
For more options, have a look at the example files in examples/
to get a feel for how things work. There is also a standalone template if you don't wish to use this libray., (*4)
Todo's
- Catch & Handle Errors
- Write Tests
- Ability to change endpoint configuration via POST requests
dev-master
9999999-dev
A PHP wrapper for the EdgeOS API
Sources
Download
MIT
The Requires
The Development Requires
by
William James
0.0.1.x-dev
0.0.1.9999999-dev
A PHP wrapper for the EdgeOS API
Sources
Download
MIT
The Requires
The Development Requires
by
William James