def submit_query(request, url, type_, params=None): klass = None template = None setup_access() if url is not None and len(url) > 0: if url[-1] == "/": url = url + "?access_token=" + access_token.get_access_token() else: url = url + "&access_token=" + access_token.get_access_token() try: results = Broker.get(url) except pytxFetchError, e: return {'success': False, 'message': e.message['message']}
def verify_token(self, expected_token): assert expected_token == access_token.get_access_token()