Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
yandexdirectlive.php
1<?
8namespace Bitrix\Seo\Engine;
9
14
15if(!defined('YANDEX_DIRECT_LIVE_API_URL'))
16{
17 define('YANDEX_DIRECT_LIVE_API_URL', 'https://api.direct.yandex.ru/live/v4/json/');
18}
19
26{
27 const API_URL = YANDEX_DIRECT_LIVE_API_URL;
28
29 const METHOD_STAT_BANNER = 'GetBannersStat';
30
32
34
35 public $allowedCurrency = array('RUB', 'CHF', 'EUR', 'KZT', 'TRY', 'UAH', 'USD');
36
48 public function getBannerStats(array $params)
49 {
50 $result = $this->query("", static::METHOD_STAT_BANNER, $params);
51 $result = YandexJson::decode($result->getResult());
52
53 if(!empty($result['error_code']))
54 {
55 throw new YandexDirectException($result);
56 }
57
58 return $result["data"];
59 }
60}
static decode($data)
Definition json.php:53
query($scope, $method="GET", $param=NULL, $skipRefreshAuth=false)