2017 © Pedro Peláez
 

library unifi-api-client

Unifi API Client can be used to connect to the API of your Ubiquiti Unifi Controller

image

jorisvandesande/unifi-api-client

Unifi API Client can be used to connect to the API of your Ubiquiti Unifi Controller

  • Sunday, November 26, 2017
  • by jorisvandesande
  • Repository
  • 4 Watchers
  • 16 Stars
  • 65 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 9 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Unifi API Client

Unifi API Client can be used to connect to the API of your Ubiquiti Unifi Controller. This client is build on top of Guzzle., (*1)

The code is tested against Unifi Controller version 4.6.6., (*2)

Installation

The API client can be installed with Composer:, (*3)

composer require jorisvandesande/unifi-api-client

Or you can download the latest release at: https://github.com/jorisvandesande/unifi-api-client/releases, (*4)

Usage

use JVDS\UnifiApiClient\Client;
use GuzzleHttp\Client as HttpClient;

$apiClient = new Client(new HttpClient(['base_uri' => 'https://127.0.0.1:8443']));
$apiClient->login('your_username', 'your_password');

// call supported methods via methods on the client
$apiClient->statistics('default');

// or call any API url via the get and post methods:
$apiClient->get('/api/self');
$apiClient->post('/api/s/default/cmd/stamgr', ['cmd' => 'block-sta', 'mac' => '01:01:01:01:01:01']);

// logout
$apiClient->logout();

Examples can be found in the examples directory. To run the examples, you must copy the config.example.php file to config.php and change the configuration to your needs., (*5)

Supported API calls

At the moment only a few API methods are implemented in the Client. Altough it is possible to use the get() and post() methods of the Client to call any API url, the goal is to support more methods., (*6)

License

MIT Licensed, see the LICENSE file., (*7)

The Versions

26/11 2017

dev-master

9999999-dev https://github.com/jorisvandesande/unifi-api-client

Unifi API Client can be used to connect to the API of your Ubiquiti Unifi Controller

  Sources   Download

MIT

The Requires

 

api client api client unifi ubiquiti unifi controller