abstract-comment-api/php-rest-client

There is no license information available for the latest version (v1.0) of this package.

v1.0 2020-08-25 00:48 UTC

This package is auto-updated.

Last update: 2024-04-25 09:32:25 UTC


README

Клиент для абстрактного сервиса комментариев

Установка

composer require abstract-comment-api/php-rest-client

Пример использования

use pakman\RestClient\ClientBuilder;

$commentApi = ClientBuilder::createCommentApiClient('https://example.com');

$comment = $commentApi->create('User name', 'User comment');
$commentApi->update($comment->id, 'User updated name', 'User updated comment');

$comments = $commentApi->getList();
foreach ($comments as $comment)
{
    echo $comment->id;
    echo $comment->name;
    echo $comment->text;
}