brueggern/crestron-fusion-handler 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

brueggern/crestron-fusion-handler

Composer 安装命令:

composer require brueggern/crestron-fusion-handler

包简介

Fetch data from the Crestron Fusion API

README 文档

README

The Crestron Fusion Handler is able to fetch all rooms or appointments using the Crestron Fusion REST API.

Create Handler

First you need to create a new handler object and set the auth params if enabled on your API.

$handler = new CrestronFusionHandler('https://123.45.67.89/fusion/apiservice');
$handler->setAuth('some-token', 'some-user');

Fetch Rooms

Fetch all rooms.

$roomsCollection = $handler->getRooms();

Fetch Appointments

Fetch appointments of specific rooms.

$rooms = new CFCollection();
$rooms->addItem(new CFRoom(['id' => '41746b03-1803-4d65-84eb-06815688c780']));
$appointmentsCollection = $handler->getAppointments(new DateTime(), $rooms);

Collections

Instead of arrays, a collection object is always returned. For more information, see src/CFCollection.php

$collection = new CFCollection();
$collection->addItem('Room One', 'room1');
$collection->addItem('Room Two, 'room2');

$name = $collection->getItem('room1');
// $name => Room One

$collection->deleteItem('room2');
// or
$collection->deleteItem(1);

$array = $collection->get();
// Returns an array

$mergedCollection = $collection1->append($collection2)//
// Append all items of a collection to another collection

Development / Tests / Linting

composer install
cp tests/.env.testing.example tests/.env.testing

composer run test:online
composer run test:offline
composer run lint

Notes

In future versions it should also be possible to update entities such as rooms, appointments, etc.

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2019-05-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固