示例#1
0
 def __init__(self, **kwargs):
     query_args = {}
     for key, value in kwargs.iteritems():
         if is_arg_valid(key, settings.SUPPORTED_SEARCH_ARGS):
             query_args[key] = value
             # print_debug('%s : %s' % (key, value), 'arg')
         else:
             print_debug('%s : %s -- THIS ARG IS NOT SUPPORTED!' % (key, value), 'ArgError')
     self.encoded_query_args = urllib.urlencode(query_args)
示例#2
0
 def __init__(self, json_data):
     result = {}
     for key, value in json_data.items():
         if is_arg_valid(key, SUPPORTED_KEYS):
             result[key] = value
             #print_debug('%s : %s' % (key, value), 'arg')
         else:
             print_debug('%s : %s -- THIS KEY IS NOT SUPPORTED!' % (key, value), 'KeyError')
     self.result = result
示例#3
0
 def __init__(self, **kwargs):
     query_args = {}
     for key, value in kwargs.items():
         if is_arg_valid(key, settings.SUPPORTED_SEARCH_ARGS):
             query_args[key] = value
             # print_debug('%s : %s' % (key, value), 'arg')
         else:
             print_debug('%s : %s -- THIS ARG IS NOT SUPPORTED!' % (key, value), 'ArgError')
     self.encoded_query_args = urllib.parse.urlencode(query_args)
示例#4
0
 def __init__(self, lang = 'en', **kwargs):
     query_args = {}
     for key, value in kwargs.iteritems():
         if is_arg_valid(key, settings.SUPPORTED_ASSOCIATION_ARGS):
             query_args[key] = value
             # print_debug('%s : %s' % (key, value), 'arg')
         else:
             print_debug('%s : %s -- THIS ARG IS NOT SUPPORTED!' % (key, value), 'ArgError')
     self.encoded_query_args = urllib.urlencode(query_args)
     self.lang = lang
示例#5
0
 def __init__(self, json_data):
     result = {}
     for key, value in json_data.items():
         if is_arg_valid(key, SUPPORTED_KEYS):
             result[key] = value
             # print_debug('%s : %s' % (key, value), 'arg')
         else:
             print_debug(
                 '%s : %s -- THIS KEY IS NOT SUPPORTED!' % (key, value),
                 'KeyError')
     self.result = result