public function fetchData()
    {
        if (!$this->guzzle) {
            $this->guzzle = new \GuzzleHttp\Client();
        }

        $args = $this->args;
        if ($this->accessToken) {
            $args['access_token'] = $this->accessToken;
        }

        if ((empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] === 'off') && false !== $this->noHttpsSecret) {
            $args['sig'] = md5('/method/'.$this->methodName.'?'.http_build_query($args).$this->noHttpsSecret);
        }

        $data = $this->guzzle->post(self::URL_VK_API . $this->methodName, ['form_params' => $args])->getBody();
        $data = json_decode($data);
        $c = new Api($data, $this->callback);

        return $c;
    }
public function fetchData()
    {
        if (!$this->guzzle) {
            $this->guzzle = new \GuzzleHttp\Client();
        }

        $args = $this->args;
        if ($this->accessToken) {
            $args['access_token'] = $this->accessToken;
        }

        if ((empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] === 'off') && false !== $this->noHttpsSecret) {
            $args['sig'] = md5('/method/'.$this->methodName.'?'.http_build_query($args).$this->noHttpsSecret);
        }

        $data = $this->guzzle->post(self::URL_VK_API . $this->methodName, ['form_params' => $args])->getBody();
        $data = json_decode($data);
        $c = new Api($data, $this->callback);

        return $c;
    }
public function fetchData ( ) { if ( ! $ this -> guzzle ) { $ this -> guzzle = new \ GuzzleHttp \ Client ( ) ; } $ args = $ this -> args ; if ( $ this -> accessToken ) { $ args [ 'access_token' ] = $ this -> accessToken ; } if ( ( empty ( $ _SERVER [ 'HTTPS' ] ) || $ _SERVER [ 'HTTPS' ] === 'off' ) && false !== $ this -> noHttpsSecret ) { $ args [ 'sig' ] = md5 ( '/method/' . $ this -> methodName . '?' . http_build_query ( $ args ) . $ this -> noHttpsSecret ) ; } $ data = $ this -> guzzle -> post ( self :: URL_VK_API . $ this -> methodName , [ 'form_params' => $ args ] ) -> getBody ( ) ; $ data = json_decode ( $ data ) ; $ c = new Api ( $ data , $ this -> callback ) ; return $ c ; }
Querying API for a data.

@return Api
Querying API for a data .