承接 emiliopedrollo/yeelight-api-client 相关项目开发

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

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

emiliopedrollo/yeelight-api-client

Composer 安装命令:

composer require emiliopedrollo/yeelight-api-client

包简介

Client library for Yeelight API

README 文档

README

Build Status Scrutinizer Code Quality

Yeelight-api-client is a PHP client that makes it easy to manage and handle Yeelight bulbs.

Installation

Installation is possible using Composer.

Then install the library:

composer require elberth90/yeelight-api-client

Getting started

Create YeelightClient instance

use Yeelight\YeelightClient;
$client = new \Yeelight\YeelightClient();

Search for bulbs in your local network

$bulbList = $client->search();

Once you have list of available bulbs, you can perform on each bulb some actions like for example getting property of each bulb

foreach ($bulbList as $bulb) {
    $promise = $bulb->getProp([\Yeelight\Bulb\BulbProperties::COLOR_TEMPERATURE]);
}

Each action performed on bulb return Promise, so you can perform on it then() or done() operation.

$promise->done(function (\Yeelight\Bulb\Response $response) {
    // do something with response
}, function (\Yeelight\Bulb\Exceptions\Exception $exception) {
    // log exception or whatever...
});

Full documentation for an API can be found here

Contributing

See CONTRIBUTING.md for more information about contributing and developing yeelight-api-client.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-04-19