allowed_param = ['q', 'lang', 'rpp', 'page', 'since_id', 'geocode', 'show_user'],
)(self, *args, **kargs)
+ def trends(self):
+ return bind_api(
+ host = 'search.' + self.host,
+ path = '/trends.json',
+ parser = parse_trend_results
+ )(self)
+
except ImportError:
import simplejson as json
+def parse_json(data, api):
+
+ return json.loads(data)
+
+def parse_return_true(data, api):
+
+ return True
+
+def parse_none(data, api):
+
+ return None
+
def parse_error(data):
return json.loads(data)['error']
result_objects.append(_parse_search_result(obj, api))
return result_objects
-def parse_json(data, api):
-
- return json.loads(data)
-
-def parse_return_true(data, api):
+def parse_trend_results(data, api):
- return True
+ return json.loads(data)['trends']
+
-def parse_none(data, api):
-
- return None