:rtype: :class:`User` object
-.. method:: API.update_profile_background_image(filename)
-
- Update authenticating user's background image. Valid formats: GIF, JPG, or
- PNG
-
- :param filename: local path to image file to upload. Not a remote URL!
- :rtype: :class:`User` object
-
-
.. method:: API.update_profile([name], [url], [location], [description])
Sets values that users are able to set under the "Account" tab of their
"""
def testupateprofileimage(self):
self.api.update_profile_image('examples/profile.png')
-
- def testupdateprofilebg(self):
- self.api.update_profile_background_image('examples/bg.png')
"""
@tape.use_cassette('testupdateprofilebannerimage.yaml', serializer='yaml')
require_auth=True
)(self, post_data=post_data, headers=headers)
- def update_profile_background_image(self, filename, **kwargs):
- """ :reference: https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/post-account-update_profile_background_image
- :allowed_param: 'tile', 'include_entities', 'skip_status', 'use'
- """
- f = kwargs.pop('file', None)
- headers, post_data = API._pack_image(filename, 800, f=f)
- return bind_api(
- api=self,
- path='/account/update_profile_background_image.json',
- method='POST',
- payload_type='user',
- allowed_param=['tile', 'include_entities', 'skip_status', 'use'],
- require_auth=True
- )(post_data=post_data, headers=headers)
-
def update_profile_banner(self, filename, **kwargs):
""" :reference: https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/post-account-update_profile_banner
:allowed_param: 'width', 'height', 'offset_left', 'offset_right'