From b60ab49c4eb032e0e8a80e3e4a2feaa8f697dea4 Mon Sep 17 00:00:00 2001 From: Josh Roesslein Date: Sun, 5 Jul 2009 23:07:54 -0500 Subject: [PATCH] Added favorite methods. create/destroy favorites not working yet. --- api.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) 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') -- 2.25.1