Example #1
0
 def test(self):
     try:
         bind_api(
             path = '/help/test.json',
         )(self)
     except TweepError:
         return False
     return True
Example #2
0
 def update_profile_background_image(self, filename, *args, **kargs):
     headers, post_data = API._pack_image(filename, 800)
     bind_api(
         path = '/account/update_profile_background_image.json',
         method = 'POST',
         payload_type = 'user',
         allowed_param = ['tile'],
         require_auth = True
     )(self, post_data=post_data, headers=headers)
Example #3
0
 def exists_block(self, *args, **kargs):
     try:
         bind_api(
             path = '/blocks/exists.json',
             allowed_param = ['id', 'user_id', 'screen_name'],
             require_auth = True
         )(self, *args, **kargs)
     except TweepError:
         return False
     return True
Example #4
0
 def destroy_list(self, slug):
     return bind_api(
         path = '/%s/lists/%s.json' % (self.auth.get_username(), slug),
         method = 'DELETE',
         payload_type = 'list',
         require_auth = True
     )(self)
Example #5
0
 def is_subscribed_list(self, owner, slug, user_id):
     try:
         return bind_api(
             path = '/%s/%s/subscribers/%s.json' % (owner, slug, user_id),
             payload_type = 'user'
         )(self)
     except TweepError:
         return False
Example #6
0
 def remove_list_member(self, slug, *args, **kargs):
     return bind_api(
         path = '/%s/%s/members.json' % (self.auth.get_username(), slug),
         method = 'DELETE',
         payload_type = 'list',
         allowed_param = ['id'],
         require_auth = True
     )(self, *args, **kargs)
Example #7
0
 def update_list(self, slug, *args, **kargs):
     return bind_api(
         path = '/%s/lists/%s.json' % (self.auth.get_username(), slug),
         method = 'POST',
         payload_type = 'list',
         allowed_param = ['name', 'mode', 'description'],
         require_auth = True
     )(self, *args, **kargs)
Example #8
0
 def update_profile_image(self, filename):
     headers, post_data = API._pack_image(filename, 700)
     return bind_api(
         path = '/account/update_profile_image.json',
         method = 'POST',
         payload_type = 'user',
         require_auth = True
     )(self, post_data=post_data, headers=headers)
Example #9
0
 def verify_credentials(self):
     try:
         return bind_api(
             path = '/account/verify_credentials.json',
             payload_type = 'user',
             require_auth = True
         )(self)
     except TweepError, e:
         if e.response and e.response.status == 401:
             return False
         raise
Example #10
0
    def verify_credentials(self):
        try:
            return bind_api(
                path = '/account/verify_credentials.json',
                payload_type = 'user',
                require_auth = True
            )(self)
        except TweepError, e:
            if e.response and e.response.status == 401:
                return False
            raise

    """ account/rate_limit_status """
    rate_limit_status = bind_api(
        path = '/account/rate_limit_status.json',
        payload_type = 'json',
        use_cache = False
    )

    """ account/update_delivery_device """
    set_delivery_device = bind_api(
        path = '/account/update_delivery_device.json',
        method = 'POST',
        allowed_param = ['device'],
        payload_type = 'user',
        require_auth = True
    )

    """ account/update_profile_colors """
    update_profile_colors = bind_api(
        path = '/account/update_profile_colors.json',