ApiRequest::__construct

  1. Bitrix24 API (v. 23.675.0)
  2. sender
  3. ApiRequest
  4. __construct
  • Модуль: sender
  • Путь к файлу: ~/bitrix/modules/sender/lib/integration/yandex/toloka/apirequest.php
  • Класс: Bitrix\Sender\Integration\Yandex\Toloka\ApiRequest
  • Вызов: ApiRequest::__construct
public function __construct()
{
	if (!Loader::includeModule('seo'))
	{
		throw new SystemException('Module seo not installed.');
	}

	if (!Service::isRegistered())
	{
		Service::register();
		$this->registerOnCloudAdv();
	}
	$authorizeData = Service::getAuthorizeData(\Bitrix\Seo\Engine\Bitrix::ENGINE_ID, 'M');

	$this->setAccessToken(COption::GetOptionString('sender', self::ACCESS_CODE));
	$this->setClientId($authorizeData['client_id']);
	$this->setClientSecret($authorizeData['client_secret']);
}

Добавить комментарий