9nekra/example-com-client

example.com服务的简单客户端。

v0.2.1 2019-11-19 13:27 UTC

This package is auto-updated.

Last update: 2024-09-20 00:58:50 UTC


README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

本项目代表了一个用于虚构的example.com评论服务的客户端。

安装

通过Composer

$ composer require 9nekra/example-com-client:^0

用法

获取评论

use Nekra\ExampleComClient\ExampleClientBuilder;

$exampleClient = ExampleClientBuilder::create();
$comments = $exampleClient->getComments();

添加评论

use \Nekra\ExampleComClient\Comment;

$comment = new Comment(['name' => 'Name 1', 'text' => 'text two']);
$exampleClient->postComment($comment);

修改评论

use \Nekra\ExampleComClient\Comment;

$comment = new Comment(['id' => 1, 'name' => 'New Name 22','text' => 'text two']);
$exampleClient->updateComment($comment);

变更日志

请参阅CHANGELOG获取最近更改的详细信息。

测试

$ composer test

贡献

请参阅CONTRIBUTINGCODE_OF_CONDUCT获取详细信息。

安全

如果您发现任何安全问题,请通过9nekra@gmail.com发送电子邮件,而不是使用问题跟踪器。

致谢

  • Alexander
  • [所有贡献者][link-contributors]

许可协议

MIT许可协议(MIT)。请参阅许可文件获取更多信息。