所以我根据TeamUp 日历文档安装了 Guzzle 库版本 6 。但是,当我尝试运行下面的代码时,我得到
Fatal error: Call to undefined method GuzzleHttp\Psr7\Response::isSuccessful()
代码:
<?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":{ ... }}
}
不应该包含在库中吗?任何人?