Download the PHP package wharfs/unms-api-client without Composer

On this page you can find all versions of the php package wharfs/unms-api-client. 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 unms-api-client

wharfs - forked to add getAllSites() and to adjusted to work in Laravel and behave more like the parent UniFi-API-client.

--

Add repository to composer.json

"repositories": [{
    "type": "vcs",
    "url": "[email protected]:wharfs/unms-api-client"
}],

--

UNMS API client class A PHP class which provides access to Ubiquiti's UNMS API, versions 2.1 of the UNMS Controller software is supported. It's a standalone version of the class which is used in our monsansfil.ca project which is a private project.

Methods and functions supported The class currently supports the following functions/methods to get/post/put/delete data through the UNMS API:

login()

logout()

create_site()

editSiteName()

getSites()

setSite()

authorizeDevice()

getAircubeWirelessConfig()

getAircubeNetworkConfig()

getAircubeSystemConfig()

setCubeLedOn()

setCubeName()

setCubeResetEnabled()

setCubePoeEnabled()

setAircubeSystemConfig()

setAircubeNetworkConfig()

setAircubeWirelessConfig()

getDevices()

getRouterInterfaces()

getAirCubeData()

getAirCubeDevices()

geteRouterDHCPLeases()

getAircubeWirelessInfo()

restartDevice($deviceId)

deleteDevice($deviceId)

Internal functions, getters/setters:

set_debug() get_debug() set_auto_logout(true/false) get_token() get_last_results_raw() get_last_error_message() Please refer to the source code for more details on the functions/methods and their parameters.

Requirements a web server with PHP and cURL modules installed (tested on apache2 with PHP Version 7.2.2 and cURL 7.45.0 ) network connectivity between this web server and the server and port (normally TCP port 443) where the UNMS Controller is running Installation You can use Git or simply Download the Release to install the API client class.

Git Execute the following git command from the shell in your project directory:

git clone https://github.com/spacie2136/unms.git When git is done cloning, include the file containing the class like so in your code:

require_once('path/to/src/Unms.php'); Download the Release If you prefer not to use composer or git, you can simply download the package, uncompress the zip file, then include the file containing the class in your code like so:

require_once('path/to/src/Unms.php'); Example usage A basic example how to use the class:

/**

In the example above, $site_id is the id of the site which is visible in the URL when managing the site in the Unms Controller:

https://:443/sites/bb44fac2-3fb6-440d-bd37-f70202bcaf0f/devices

In this case, bb44fac2-3fb6-440d-bd37-f70202bcaf0f is the value required for $site_id.

Need help or have suggestions? There is still work to be done to add functionality and improve the usability of this class, so all suggestions/comments are welcome. Please use the github issue list to share your ideas/questions.

Contribute If you would like to contribute code (improvements), please open an issue and include your code there or else create a pull request.

Credits This class is based on the work done by the following developers:

Malle-pietje: https://github.com/Art-of-WiFi/UniFi-API-client MonSansFil: https://github.com/MonSansFil/unms Important Disclaimer Many of the functions in this API client class are not officially supported by UBNT and as such, may not be supported in future versions of the Unms Controller API.


All versions of unms-api-client with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.0
ext-curl Version *
ext-json Version *
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 wharfs/unms-api-client contains the following files

Loading the files please wait ....