Add account/update_profile_banner endpoint
authorAaron Hill <aa1ronham@gmail.com>
Sun, 9 Jun 2013 15:53:17 +0000 (11:53 -0400)
committerAaron Hill <aa1ronham@gmail.com>
Sun, 9 Jun 2013 15:53:17 +0000 (11:53 -0400)
tweepy/api.py

index 3e9fe2a7a4b6bdfecb8b7ac28db554ba5cf64e9b..31ccc8d43c4c52acd943974ec826325cbd707bc2 100644 (file)
@@ -376,6 +376,17 @@ class API(object):
             require_auth = True
         )(self, post_data=post_data, headers=headers)
 
+    """ account/update_profile_banner """
+    def update_profile_banner(self, filename, *args, **kargs):
+        headers, post_data = API._pack_image(filename, 700, form_field="banner")
+        bind_api(
+            path = '/account/update_profile_banner.json',
+            method = 'POST',
+            allowed_param = ['width', 'height', 'offset_left', 'offset_right'],
+            require_auth = True
+        )(self, post_data=post_data, headers=headers)
+
+
     """ account/update_profile """
     update_profile = bind_api(
         path = '/account/update_profile.json',