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)
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
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)
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
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