Esempio n. 1
0
 def get_result(self,url,args=None):
     '''get_result takes a url and adds the apiKey for the get_result from utils
     :param url: the url to get the result for
     :param args: a dictionary of {"argumentName":value} to pass to the URL
     '''
     if args != None:
         for arg_name,arg_value in args.iteritems():
             if arg_value != None:
                 url = "%s&%s=%s" %(url,arg_name,arg_value)
     url = "%s&apiKey=%s" %(url,self.api.key)
     return get_url(url)
Esempio n. 2
0
 def get_result(self, url, args=None):
     '''get_result takes a url and adds the apiKey for the get_result from utils
     :param url: the url to get the result for
     :param args: a dictionary of {"argumentName":value} to pass to the URL
     '''
     if args != None:
         for arg_name, arg_value in args.items():
             if arg_value != None:
                 url = "%s&%s=%s" % (url, arg_name, arg_value)
     url = "%s&apiKey=%s" % (url, self.api.key)
     return get_url(url)