14 $url =
'https://api.vk.com/method/';
15 $url .= $params[
'endpoint'];
17 $clientParameters = is_array($params[
'fields']) ? $params[
'fields'] : array();
18 $clientParameters = $clientParameters + [
'v' =>
'5.107',
'access_token' => $this->adapter->getToken()];
21 if (isset($params[
'method']) && $params[
'method'] ==
'POST')
23 return $this->client->post($url, $clientParameters);
27 $url .=
'?' . http_build_query($clientParameters,
"",
"&");
28 return $this->client->get($url);