alexeevdv/carrot-quest-php-client

PHP client for carrotquest.io Web API

0.1.0 2019-12-12 08:12 UTC

This package is auto-updated.

Last update: 2024-04-14 20:43:40 UTC


README

Build Status codecov PHP 7.1 PHP 7.2 PHP 7.3 PHP 7.4

PHP client for carrotquest.io Web API

Installation

The preferred way to install this extension is through composer.

Either run

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

or add

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

to the require section of your composer.json file.

Configuration

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

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

Implemented methods

Setting user properties

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

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