alexeevdv/carrot-quest-php-client

carrotquest.io Web API 的 PHP 客户端

0.1.0 2019-12-12 08:12 UTC

This package is auto-updated.

Last update: 2024-09-14 21:33:27 UTC


README

Build Status codecov PHP 7.1 PHP 7.2 PHP 7.3 PHP 7.4

carrotquest.io Web API 的 PHP 客户端

安装

安装此扩展的首选方式是通过composer

运行以下命令之一:

$ php composer.phar require alexeevdv/carrot-quest-php-client "^0.1"

或者将以下内容添加到您的composer.json文件的require部分:

"alexeevdv/carrot-quest-php-client": "^0.1"

require

配置

$guzzle = new \GuzzleHttp\Client([
    'base_uri' => 'https://api.carrotquest.io',
]);

$apiClient = new \alexeevdv\CarrotQuest\Client(
    'your_auth_token_goes_here',
    $guzzle
);

实现的方法

设置用户属性

https://carrotquest.io/developers/endpoints/users/props/

interface ClientInterface
{
    public function userSetProperties(int $userId, array $properties, $isCarrotQuestUser = true): void;
}