def get_uri(self, query, params=None, **kwargs):
        if isinstance(query, basestring):
            query = YQLQuery(query)
        query_params = self.get_query_params(query, params, **kwargs)

        token = kwargs.get("token")

        if hasattr(token, "yahoo_guid"):
            query_params["oauth_yahoo_guid"] = getattr(token, "yahoo_guid")

        if not token:
            raise ValueError("Without a token three-legged-auth cannot be"
                                                            " carried out")

        yql_logger.debug("query_params: %s", query_params)
        http_method = query.get_http_method()
        url = self.endpoint
        oauth_request = oauth.Request.from_consumer_and_token(
                                    self.consumer, http_url=url,
                                    token=token, parameters=query_params,
                                    http_method=http_method)
        yql_logger.debug("oauth_request: %s", oauth_request)
        # Sign request
        sig = self.get_signature(url)
        oauth_request.sign_request(sig, self.consumer, token)
        yql_logger.debug("oauth_signed_request: %s", oauth_request)
        url = oauth_request.to_url()
        url = clean_url(url)
        return url.replace('+', '%20').replace('%7E', '~')
Make a new copy of this validator
dataset/ETHPy150Open project-fondue/python-yql/yql/__init__.py/ThreeLegged.get_uri--crossover with--dataset/ETHPy150Open ODM2/ODMToolsPython/odmtools/lib/oldOlv/CellEditor.py/NumericValidator.Clone