protected function request($url, $queries = [])
{
$url = $this->url . '/' . trim($url, '/');
$client = new Client();
$options = ['headers' => ['Accept' => 'application/json'], 'query' => $queries];
if ($this->auth !== null) {
$options['auth'] = $this->auth;
}
$res = $client->request('GET', $url, $options);
return json_decode($res->getBody());
}