Exemplo n.º 1
0
 def test(self):
     try:
         bind_api(
             path = '/help/test.json',
         )(self)
     except TweepError:
         return False
     return True
Exemplo n.º 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)
Exemplo n.º 3
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)
Exemplo n.º 4
0
 def verify_credentials(self, **kargs):
     try:
         return bind_api(
             path = '/account/verify_credentials.json',
             payload_type = 'user',
             require_auth = True,
             allowed_param = ['include_entities', 'skip_status'],
         )(self, **kargs)
     except TweepError, e:
         if e.response and e.response.status == 401:
             return False
         raise
Exemplo n.º 5
0
        try:
            return bind_api(
                path = '/account/verify_credentials.json',
                payload_type = 'user',
                require_auth = True,
                allowed_param = ['include_entities', 'skip_status'],
            )(self, **kargs)
        except TweepError, e:
            if e.response and e.response.status == 401:
                return False
            raise

    """ account/rate_limit_status """
    rate_limit_status = bind_api(
        path = '/application/rate_limit_status.json',
        payload_type = 'json',
        allowed_param = ['resources'],
        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',