From b227a9245a18d1bc5f20dbd542eec0822936a1b1 Mon Sep 17 00:00:00 2001 From: Josh Roesslein Date: Mon, 2 Nov 2009 15:58:22 -0600 Subject: [PATCH] Some minor fixes to API. --- CHANGES | 2 ++ tweepy/api.py | 14 +++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CHANGES b/CHANGES index 82e51be..c03917c 100644 --- a/CHANGES +++ b/CHANGES @@ -7,6 +7,8 @@ during upgrade will be listed here. are valid. Otherwise false will be returned. + API.new() removed + Removed model validation. Prone to breakage due to API changes. ++ Moved documentation out of api.py and into wiki. ++ Removed 'email' parameter from API.update_profile. No longer supported. 1.1 -> 1.2 [Current] ===================== diff --git a/tweepy/api.py b/tweepy/api.py index 07a3e6a..054409c 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -590,10 +590,10 @@ class API(object): """ def update_profile_image(self, filename): headers, post_data = API._pack_image(filename, 700) - bind_api( + return bind_api( path = '/account/update_profile_image.json', method = 'POST', - parser = parse_none, + parser = parse_user, require_auth = True )(self, post_data=post_data, headers=headers) @@ -613,7 +613,7 @@ class API(object): bind_api( path = '/account/update_profile_background_image.json', method = 'POST', - parser = parse_none, + parser = parse_user, allowed_param = ['tile'], require_auth = True )(self, post_data=post_data, headers=headers) @@ -623,7 +623,7 @@ class API(object): Sets values that users are able to set under the "Account" tab of their settings page. Only the parameters specified will be updated. - Parameters: name, email, url, location, description + Parameters: name, url, location, description Returns: User http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-account%C2%A0update_profile @@ -632,7 +632,7 @@ class API(object): path = '/account/update_profile.json', method = 'POST', parser = parse_user, - allowed_param = ['name', 'email', 'url', 'location', 'description'], + allowed_param = ['name', 'url', 'location', 'description'], require_auth = True ) @@ -741,7 +741,7 @@ class API(object): path = '/blocks/create.json', method = 'POST', parser = parse_user, - allowed_param = ['id'], + allowed_param = ['id', 'user_id', 'screen_name'], require_auth = True ) @@ -759,7 +759,7 @@ class API(object): path = '/blocks/destroy.json', method = 'DELETE', parser = parse_user, - allowed_param = ['id'], + allowed_param = ['id', 'user_id', 'screen_name'], require_auth = True ) -- 2.25.1