1 | <?php |
||
7 | class Botan |
||
8 | { |
||
9 | |||
10 | /** |
||
11 | * @var string Tracker url |
||
12 | */ |
||
13 | const BASE_URL = 'https://api.botan.io/track'; |
||
14 | |||
15 | /** |
||
16 | * CURL object |
||
17 | * |
||
18 | * @var |
||
19 | */ |
||
20 | protected $curl; |
||
21 | |||
22 | |||
23 | /** |
||
24 | * Yandex AppMetrica application api_key |
||
25 | * |
||
26 | * @var string |
||
27 | */ |
||
28 | protected $token; |
||
29 | |||
30 | /** |
||
31 | * Botan constructor |
||
32 | * |
||
33 | * @param string $token |
||
34 | * |
||
35 | * @throws \Exception |
||
36 | */ |
||
37 | 2 | public function __construct($token) |
|
50 | |||
51 | /** |
||
52 | * Event tracking |
||
53 | * |
||
54 | * @param \TelegramBot\Api\Types\Message $message |
||
55 | * @param string $eventName |
||
56 | * |
||
57 | * @throws \TelegramBot\Api\Exception |
||
58 | * @throws \TelegramBot\Api\HttpException |
||
59 | */ |
||
60 | public function track(Message $message, $eventName = 'Message') |
||
84 | |||
85 | /** |
||
86 | * Destructor. Close curl |
||
87 | */ |
||
88 | 2 | public function __destruct() |
|
92 | } |
||
93 |