From: Josh Roesslein Date: Mon, 6 Jul 2009 04:07:54 +0000 (-0500) Subject: Added favorite methods. create/destroy favorites not working yet. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b60ab49c4eb032e0e8a80e3e4a2feaa8f697dea4;p=tweepy.git Added favorite methods. create/destroy favorites not working yet. --- diff --git a/api.py b/api.py index 84e1256..e79c854 100644 --- a/api.py +++ b/api.py @@ -229,4 +229,29 @@ class API(object): require_auth = True ) + """Get favorites""" + favorites = bind_api( + path = '/favorites.json', + parser = parse_statuses, + allowed_param = ['id', 'page'] + ) + + """Create favorite""" + create_favorite = bind_api( + path = '/favorites/create.json', + method = 'POST', + parser = parse_status, + allowed_param = ['id'], + require_auth = True + ) + + """Destroy favorite""" + destroy_favorite = bind_api( + path = '/favorites/destroy.json', + method = 'DELETE', + parser = parse_status, + allowed_param = ['id'], + require_auth = True + ) + api = API('jitterapp', 'josh1987')