primeinc / edgeapi
A PHP wrapper for the EdgeOS API
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 1
pkg:composer/primeinc/edgeapi
Requires
- php: >=5.5.0
- guzzlehttp/guzzle: 6.0.1
Requires (Dev)
- filp/whoops: ^1.1
This package is not auto-updated.
Last update: 2025-10-25 23:42:44 UTC
README
A PHP wrapper for the EdgeOS API
Installation
-
Use Composer to install EdgeAPI into your project:
composer require primeinc/edgeapi
-
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