src/Client.php
public function call($method, $data)
    {
        try {
            $response = $this->http->request('POST', $method, [
                'headers' => [
                    'X-Viber-Auth-Token' => $this->token
                ],
                'json' => $data
            ]);
            return \Viber\Api\Response::create($response);
        } catch (\RuntimeException $e) {
            throw new ApiException($e->getMessage(), $e->getCode(), $e);
        }
    }
public function call($method, $data)
    {
        try {
            $response = $this->http->request('POST', $method, [
                'headers' => [
                    'X-Viber-Auth-Token' => $this->token
                ],
                'json' => $data
            ]);
            return \Viber\Api\Response::create($response);
        } catch (\RuntimeException $e) {
            throw new ApiException($e->getMessage(), $e->getCode(), $e);
        }
    }
public function call ( $ method , $ data ) { try { $ response = $ this -> http -> request ( 'POST' , $ method , [ 'headers' => [ 'X-Viber-Auth-Token' => $ this -> token ] , 'json' => $ data ] ) ; return \ Viber \ Api \ Response :: create ( $ response ) ; } catch ( \ RuntimeException $ e ) { throw new ApiException ( $ e -> getMessage ( ) , $ e -> getCode ( ) , $ e ) ; } }
Call api method

@throws \Viber\Api\Exception\ApiException
@param  string $method method name
@param  mixed $data method data
@return \Viber\Api\Response
Call api method