• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/tradingplatform/vk/api/api.php
  • Класс: BitrixSaleTradingPlatformVkApiApi
  • Вызов: Api::run
public function run($method, $params = array())
{
	$params['access_token'] = $this->accessToken;
	$params['v'] = self::$apiVersion;
	$url = self::$apiUrl . $method;
	
	$http = new HttpClient();
	$responseStr = $http->post($url, $params);
	
	if (!is_string($responseStr))
	{
		return NULL;
	}
	
	$this->response = Json::decode($responseStr);
	$this->checkError($method, $params);
	
	return $this->response['response'];
}