承接 phlak/lifx-client 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

phlak/lifx-client

Composer 安装命令:

composer require phlak/lifx-client

包简介

PHP client library for the LIFX API (v1)

README 文档

README

LIFX Client

Join our Community Become a Sponsor One-time Donation
Latest Stable Version Total Downloads License Build Status StyleCI

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

Install with Composer

composer require phlak/lifx-client

Initializing the Client

First, import LIFX:

use PHLAK\LIFX;

Then instantiate the class with your LIFX OAuth 2 access token. You can generate an access token from your account settings page:

$lifx = new LIFX\Client('YOUR_APP_TOKEN');

Usage

List one or more lights via a selector:

$lifx->listLights($selector = 'all');

Set the state of one or more lights via a selector:

$lifx->setState($selector, array $params);

Set multiple states across multiple selectors:

$lifx->setStates(array $states, array $defaults = []);

Toggle the power of one or more lights via a selector:

$lifx->togglePower($selector, $duration = 1);

Cause one or more lights to breathe via a selector:

$lifx->breatheEffect($selector, $color, array $params = []);

Cause one or more lights to pulse via a selector:

$lifx->pulseEffect($selector, $color, array $params = []);

Make the light(s) cycle to the next or previous state in a list of states:

$lifx->cycle($selector, array $states, array $params = []);

Get a list of available scenes:

$lifx->listScenes();

Activate a scene:

$lifx->activateScene($sceneUuid, $duration = 1.0);

Validate a color string:

$lifx->validateColor($string);

Handling Exceptions

use GuzzleHttp\Exception\ClientException;

try {
    $lifx->togglePower('id:123456789abcd');
} catch (ClientException $exception) {
    // Handle this exception here...
}

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.

phlak/lifx-client 适用场景与选型建议

phlak/lifx-client 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7.24k 次下载、GitHub Stars 达 8, 最近一次更新时间为 2017 年 02 月 23 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 phlak/lifx-client 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 phlak/lifx-client 我们能提供哪些服务?
定制开发 / 二次开发

基于 phlak/lifx-client 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 7.24k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 9
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 2
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-02-23