Skip to content

SonkoDmitry/yii2-botan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Botan API for Yii2

This extension is the way to integrate iprit/botan-php wrapper with your Yii2 application.

Installation

The preferred way to install this extension is through composer.

To install, either run

$ composer require sonko-dmitry/yii2-botan:*

or add

"sonko-dmitry/yii2-botan": "*"

to the require section of your composer.json file.

Usage

  1. Add the component configuration in your global main.php config file:
'components' => [
    'botan' => [
        'class' => 'SonkoDmitry\Yii\Botan\Component',
        'token' => 'YOUR_YANDEX_APPMETRIKA_TOKEN',
    ],
],
  1. Now you can use component
public function _incomingMessage($message_json) {
    $messageObj = json_decode($message_json, true);
    $messageData = $messageObj['message'];

    \Yii::$app->botan->track($messageData, 'Start');
}

Where 123 unique customer ID, for example chat_id or sender_id

About

Wrapper bot botan.io API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages