+ added new() method. shortcut for setting up new API instances
example: API.new(auth='basic', username='testuser', password='testpass')
+ update_profile_image() and update_profile_background_image() method added.
+ + Added search API methods:
+ trends, trends_current, trends_daily, and trends_weekly
+ Streaming:
+ Update to new streaming API methods
+ New StreamListener class replacing callback function
when user is not followed.
+ python 2.5 import syntax error fixed
+ python 2.5 timeout support for streaming API
++ Changed indents from 2 to 4 spaces
+
Gitorious: <http://gitorious.org/tweepy>
Github: <http://github.com/joshthecoder/tweepy>
-Mailinglist: tweepy@googlegroups.com (questions/feature request/bug reports/anything else)
+Bug tracker: http://github.com/joshthecoder/tweepy/issues
+Mailing list: tweepy@googlegroups.com
Author: Joshua Roesslein
License: MIT
1.0 -> 1.0.1
============
+ changing profile and background images [DONE]
-+ finish search api
++ finish search api [DONE]
+ autodetect authenticated user's ID [DONE]
+ make oauth handler more web app friendly
+ address file locking portability issues in file cache
return bind_api(
host = 'search.' + self.host,
path = '/trends.json',
- parser = parse_trend_results
+ parser = parse_json
)(self)
+ def trends_current(self, *args, **kargs):
+ return bind_api(
+ host = 'search.' + self.host,
+ path = '/trends/current.json',
+ parser = parse_json,
+ allowed_param = ['exclude']
+ )(self, *args, **kargs)
+
+ def trends_daily(self, *args, **kargs):
+ return bind_api(
+ host = "search." + self.host,
+ path = '/trends/daily.json',
+ parser = parse_json,
+ allowed_param = ['date', 'exclude']
+ )(self, *args, **kargs)
+
+ def trends_weekly(self, *args, **kargs):
+ return bind_api(
+ host = "search." + self.host,
+ path = '/trends/weekly.json',
+ parser = parse_json,
+ allowed_param = ['date', 'exclude']
+ )(self, *args, **kargs)
+
def _pack_image(filename, max_size):
"""Pack image from file into multipart-formdata post body"""
# image must be less than 700kb in size
status._api = api
for k, v in obj.items():
if k == 'user':
- setattr(status, 'author', _parse_user(v, api))
+ user = _parse_user(v, api)
+ setattr(status, 'author', user)
+ setattr(status, 'user', user) # DEPRECIATED
elif k == 'created_at':
setattr(status, k, _parse_datetime(v))
elif k == 'source':
result_objects.append(_parse_search_result(obj, api))
return result_objects
-
-def parse_trend_results(data, api):
-
- return json.loads(data)['trends']
-