alexeevdv/carrot-quest-yii2-client

Yii2 component for carrot-quest-php-client

0.1.0 2019-12-14 11:06 UTC

This package is auto-updated.

Last update: 2021-10-14 15:21:25 UTC


README

Build Status codecov PHP 7.1 PHP 7.2 PHP 7.3 PHP 7.4

Yii2 component for carrot-quest-php-client

Installation

The preferred way to install this extension is through composer.

Either run

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

or add

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

to the require section of your composer.json file.

Configuration

[
    'components' => [
        'carrotQuest' => [
            'class' => alexeevdv\yii\CarrotQuest\Client::class,
            'authToken' => 'MY_AUTH_TOKEN',
        ],
    ],
]

or

[
    'container' => [
        'singletons' => [
            alexeevdv\CarrotQuest\ClientInterface::class => [
                'class' => alexeevdv\yii\CarrotQuest\Client::class,
                'authToken' => 'MY_AUTH_TOKEN',
            ],
        ],
    ],
]

Usage

Yii::$app->carrotQuest->userSetProperties(777, ['$name' => 'John'], false);

Methods

For the list of available methods see https://github.com/alexeevdv/carrot-quest-php-client