So I have installed the Guzzle library version 6 according to TeamUp calendar documentation. However, when I try to run the code below I get
Fatal error: Call to undefined method GuzzleHttp\Psr7\Response::isSuccessful()
code:
<?php
include 'vendor/autoload.php';
define('API_KEY','****ww9d5ea2b0540ba1e02c08100b0e5**');
$client = new GuzzleHttp\Client(['headers' => ['Teamup-Token' => API_KEY]]);
$res = $client->get('https://api.teamup.com/ks************/events?startDate=2016-08-21&endDate=2016-08-25');
if ($res->isSuccessful()) {
echo $res->getBody();
// {"event":{ ... }}
}
Shouldn't be contained in Library? Anyone?