def raw_call(self, method, path, content=None):
        """Sign a given query and return its result.

        :param method: the HTTP method of the request (get/post/put/delete)
        :param path: the url you want to request
        :param content: the object you want to send in your request
         (will be automatically serialized to JSON)

        :raises APIError: Error send by api
        """
        target_url = self.base_url + path
        now = str(int(time.time()) + self.time_delta())

        body = ""
        if content:
            body = json.dumps(content)

        if not self.consumer_key:
            raise BadParametersError(msg='Cannot call API without'
                                         'Consumer Key')

        s1 = hashlib.sha1()
        s1.update(
            "+".join([
                self.application_secret,
                self.consumer_key,
                method.upper(),
                target_url,
                body,
                now
            ]).encode())
        sig = "$1$" + s1.hexdigest()
        query_headers = {
            "X-Ra-Application": self.application_key,
            "X-Ra-Timestamp": now,
            "X-Ra-Consumer": self.consumer_key,
            "X-Ra-Signature": sig,
            "Content-type": "application/json"
        }
        req = getattr(requests, method.lower())
        result = req(target_url, headers=query_headers, data=body)

        if result.text:
            try:
                json_result = json.loads(result.text)
            except ValueError:
                raise APIError('API response is not valid')
        else:
            json_result = {}

        if result.status_code == 404:
            raise ResourceNotFoundError(msg=json_result.get('message'))
        if result.status_code == 400:
            raise BadParametersError(msg=json_result.get('message'))
        if result.status_code == 409:
            raise ResourceAlreadyExistsError(msg=json_result.get('message'))
        if result.status_code == 0:
            raise NetworkError()
        if result.status_code < 100 or result.status_code >= 300:
            raise APIError(msg=json_result.get('message'))

        return json_result
dataset/ETHPy150Open runabove/python-runabove/runabove/wrapper_api.py/WrapperApi.raw_call/original