Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
accountgoogle.php
1<?
2
4
5use \Bitrix\Main\Web\Json;
6use \Bitrix\Seo\Retargeting\Account;
7use \Bitrix\Seo\Retargeting\Response;
8
9class AccountGoogle extends Account
10{
11 const TYPE_CODE = 'google';
12
13 public function getList()
14 {
15 $response = $this->request->send(array(
16 'methodName' => 'account.list',
17 'parameters' => array()
18 ));
19
20 return $response;
21 }
22
23 public function getProfile()
24 {
25 $response = $this->request->send(array(
26 'methodName' => 'retargeting.profile',
27 'parameters' => array()
28 ));
29
30 if ($response->isSuccess())
31 {
32 $data = $response->fetch();
33 return array(
34 'ID' => $data['ID'],
35 'NAME' => $data['NAME'],
36 'LINK' => '',
37 'PICTURE' => $data['PICTURE'],
38 );
39 }
40
41 return null;
42 }
43}