public function query(Query $query)
    {
        $accessToken = $this->getClient()->getAccessToken();
        $uri = $query->build($accessToken);
        $content = $this->getClient()->getHttpAdapter()->getContent($uri);
        $json = json_decode($content, true);

        if (!is_array($json) || isset($json['error'])) {
            throw GoogleAnalyticsException::invalidQuery(isset($json['error']) ? $json['error']['message'] : 'Invalid json');
        }

        return new Response($json);
    }