Skip to content

primeinc/EdgeApi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EdgeAPI

A PHP wrapper for the EdgeOS API

Installation

  1. Use Composer to install EdgeAPI into your project:

    composer require primeinc/edgeapi
  2. Setup the endpoint and guzzle client

    //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.

Todo's

  • Catch & Handle Errors
  • Write Tests
  • Ability to change endpoint configuration via POST requests

About

A PHP wrapper for the EdgeOS API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages