testmonitor/custify-client

TestMonitor Custify 客户端。

v2.0.0 2021-11-15 09:04 UTC

This package is auto-updated.

Last update: 2024-09-15 10:24:03 UTC


README

Latest Stable Version CircleCI StyleCI codecov License

本包为 Custify 提供了一个非常基础、便捷和统一的包装。

目录

安装

要安装客户端,您需要使用 composer 引入该包

$ composer require testmonitor/custify-client

使用 composer 的自动加载

require __DIR__.'/../vendor/autoload.php';

您现在已设置完成!

使用

您需要使用您的凭证实例化客户端

$custify = new \TestMonitor\Custify\Client('token');

接下来,您可以开始与 Custify 交互。

示例

获取 Custify 人员的列表

$people = $custify->people();

创建新的人员

$person = $custify->createPerson(new \TestMonitor\Custify\Resources\Person([
    'user_id' => 25,
    'email' => 'john.doe@mail.com',
    'phone' => '+44 7911 123456',
    'name' => 'John Doe',
]);

测试

该包包含集成测试。您可以使用 PHPUnit 运行它们。

$ vendor/bin/phpunit

变更日志

有关更多信息,请参阅 变更日志

贡献

有关贡献详情,请参阅 贡献指南

鸣谢

许可证

MIT 许可证(MIT)。有关更多信息,请参阅 许可证