pbousa/php-sdk 问题修复 & 功能扩展

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

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

pbousa/php-sdk

Composer 安装命令:

composer require pbousa/php-sdk

包简介

Photo Booth Options SDK for PHP

README 文档

README

Latest Stable Version Total Downloads Latest Unstable Version License

The Photo Booth Options PHP SDK helps developers leverage the Photo Booth Options API to build applications using PHP scripting language.

Quickstart

Get all users for a given machine

<?php
// Following line not needed if using composer autoloader
require('/path/to/pbousa/php-sdk/src/PboApi/PboApi.php');

$token = 'AABBA';

$client = new \PboApi\Common\Client($token);

$users = $client->machines->get(array('machine_uuid' => 'uuid_of_machine'));

print_r($users);

Getting and setting meta data

// Get some meta data
$serialNumber = $machine->getMeta('serial_number');

// Get a meta data group
$cameraData = $machine->getMetas('hardware.camera');


// Update a single meta data entry
$machine->setMeta('my.meta.key', 'this is some revealing information');

// Update multiple meta data entries
$metas = array();

$meta = new stdClass();
$meta->key = 'my.meta.key';
$meta->value = 'this is some revealing information';
$metas[] = $meta;

$meta = new stdClass();
$meta->key = 'other.meta.key';
$meta->value = 'I need this for later';
$metas[] = $meta;

$machine->setMetas($metas);

// You can also chain them like so...
$machine->setMeta('my.meta.key', 'this is some revealing information')
->setMeta('other.meta.key', 'I need this for later')
->setMeta('very.important.data', 'eat breakfast every day');

// Or combine both
$machine->setMeta('my.meta.key', 'this is some revealing information')
->setMetas($metas);

Resources

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2014-12-23