Do a query to the System API

        :param path: url to the API
        :param method: the kind of query to do
        :param params: a dict with all the
        necessary things to query the API
        :return json data

async def query(self, path, method='get', **params):
        """
        Do a query to the System API

        :param path: url to the API
        :param method: the kind of query to do
        :param params: a dict with all the
        necessary things to query the API
        :return json data
        """
        if method in ('get', 'post', 'patch', 'delete', 'put'):
            full_path = self.host + path
            if method == 'get':
                resp = await self.aio_sess.get(full_path, params=params)
            elif method == 'post':
                resp = await self.aio_sess.post(full_path, data=params)
            elif method == 'patch':
                resp = await self.aio_sess.patch(full_path, data=params)
            elif method == 'delete':
                resp = await self.aio_sess.delete(full_path, params=params, headers=params)
            elif method == 'put':
                resp = await self.aio_sess.put(full_path, data=params)

            async with resp:
                # return the content if its a binary one
                if resp.content_type.startswith('application/pdf') or \
                        resp.content_type.startswith('application/epub'):
                    return await resp.read()

                return await self.handle_json_response(resp)
        else:
            raise ValueError('method expected: get, post, patch, delete, put')