Download the PHP package phlak/lifx-client without Composer
On this page you can find all versions of the php package phlak/lifx-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download phlak/lifx-client
More information about phlak/lifx-client
Files in phlak/lifx-client
Package lifx-client
Short Description PHP client library for the LIFX API (v1)
License MIT
Informations about the package lifx-client
PHP client library for the LIFX API (v1) -- by, Chris Kankiewicz (@PHLAK)
Introduction
LIFX Client is a LIFX API client library for PHP built with GuzzleHttp.
Refer to the full LIFX API documentation for more information about each method and it's available parameters.
Requirements
- PHP >= 7.1
Install with Composer
Initializing the Client
First, import LIFX:
Then instantiate the class with your LIFX OAuth 2 access token. You can generate an access token from your account settings page:
Usage
List one or more lights via a selector:
Set the state of one or more lights via a selector:
Set multiple states across multiple selectors:
Toggle the power of one or more lights via a selector:
Cause one or more lights to breathe via a selector:
Cause one or more lights to pulse via a selector:
Make the light(s) cycle to the next or previous state in a list of states:
Get a list of available scenes:
Activate a scene:
Validate a color string:
Handling Exceptions
See the GuzzleHttp exceptions documentation for more details.
Changelog
A list of changes can be found on the GitHub Releases page.
Troubleshooting
For general help and support join our [Spectrum Community](https://spectrum.chat/phlaknet or reach out on Twitter.
Please report bugs to the GitHub Issue Tracker.
Copyright
This project is licensed under the MIT License.