Пример #1
0
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']}
Пример #2
0
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']}
Пример #3
0
 def verify_token(self, expected_token):
     assert expected_token == access_token.get_access_token()
Пример #4
0
 def verify_token(self, expected_token):
     assert expected_token == access_token.get_access_token()