def login(self):
        """Authorize client."""
        if not self.auth.access_token or \
                (hasattr(self.auth, 'access_token_expired') and self.auth.access_token_expired):
            import httplib2

            http = httplib2.Http()
            self.auth.refresh(http)

        self.session.headers.update({
            'Authorization': 'Bearer %s' % self.auth.access_token
        })
def login ( self ) : if not self . auth . access_token or ( hasattr ( self . auth , 'access_token_expired' ) and self . auth . access_token_expired ) : import httplib2 http = httplib2 . Http ( ) self . auth . refresh ( http ) self . session . headers . update ( { 'Authorization' : 'Bearer %s' % self . auth . access_token } )
Authorize client.