BaseApiObject::query

  1. Bitrix24 API (v. 23.675.0)
  2. sender
  3. BaseApiObject
  4. query
  • Модуль: sender
  • Путь к файлу: ~/bitrix/modules/sender/lib/integration/yandex/toloka/baseapiobject.php
  • Класс: Bitrix\Sender\Integration\Yandex\Toloka\BaseApiObject
  • Вызов: BaseApiObject::query
protected function query($scope, $param = NULL)
{
	if ($param === NULL)
	{
		$param = array();
	}

	$http = new HttpClient();
	$http->setRedirect(false);

	$postData = array(
		"access_code" => $this->accessToken,
		"client_id" => $this->clientId,
		"client_secret" => $this->clientSecret,
		"data" => json_encode($param, JSON_UNESCAPED_UNICODE)
	);

	if (!empty($param))
	{
		$postData = array_merge($postData, $param);
	}

	$http->post(self::API_URL.$scope, $postData, false);

	return $http;
}

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