cblink / yilianyun-sdk
包描述在这里。
v2.0.8
2021-02-04 03:52 UTC
Requires
- mouyong/foundation-sdk: ^2.0
- ramsey/uuid: ^4.0
Requires (Dev)
- mockery/mockery: ^1.3
- phpunit/phpunit: ^8.5
README
.
安装
$ composer require cblink/yilianyun-sdk-laravel -vvv
用法
use Cblink\Yilianyun\Application;
$config = [
// 登录后打开 https://dev.10ss.net/admin/listapp ,点击具体的应用进行查看
'client_id' => 'your-client-id',
'client_secret' => 'your-client-secret',
'log' => [
'name' => 'yilianyun',
],
'http' => [
'timeout' => 10,
'base_uri' => 'https://open-api.10ss.net',
'headers' => [
'accept' => 'application/json',
],
],
'cache' => [
'namespace' => 'yilianyun',
],
];
$app = new Application($config);
// 添加打印机
$app->printer->addPrinter($machine_code, $msign, $print_name, $phone);
// 从账号下终端打印机
$app->printer->removePrinter($machine_code);
// 创建文本打印任务
$app->printer->createPrinterTask($machine_code, $content, $origin_id);
// 取消终端所有未打印任务
$app->printer->cancelUnprintTaskByMachineCode($machine_code);
// 获取终端状态
$app->printer->getMachineStatusByMachineCode($machine_code);
// 获取终端的打印任务状态
$app->printer->getStatusStatusByMachineCodeAndPlatformTaskNo($machine_code);
贡献
您可以通过以下三种方式之一进行贡献
代码贡献过程并不正式。您只需确保遵循PSR-0、PSR-1和PSR-2编码指南。任何新的代码贡献都必须附带适用的情况下的单元测试。
许可证
LGPL