asana_hub/tool.py
def authenticate(self):
        """Connects to Github and Asana and authenticates via OAuth."""
        if self.oauth:
            return False

        # Save asana.
        self.settings.apply('api-asana', self.args.asana_api,
            "enter asana api key")

        # Save github.com
        self.settings.apply('api-github', self.args.github_api,
            "enter github.com token")

        logging.debug("authenticating asana api.")
        self.asana = Client.basic_auth(self.settings['api-asana'])
        self.asana_errors = asana_errors
        self.asana_me = self.asana.users.me()
        logging.debug("authenticating github api")
        self.github = Github(self.settings['api-github'])
        self.github_user = self.github.get_user()

        self.oauth = True
def authenticate(self):
        if self.oauth:
            return False

        # Save asana.
        self.settings.apply('api-asana', self.args.asana_api,
            "enter asana api key")

        # Save github.com
        self.settings.apply('api-github', self.args.github_api,
            "enter github.com token")

        logging.debug("authenticating asana api.")
        self.asana = Client.basic_auth(self.settings['api-asana'])
        self.asana_errors = asana_errors
        self.asana_me = self.asana.users.me()
        logging.debug("authenticating github api")
        self.github = Github(self.settings['api-github'])
        self.github_user = self.github.get_user()

        self.oauth = True
def authenticate ( self ) : if self . oauth : return False # Save asana. self . settings . apply ( 'api-asana' , self . args . asana_api , "enter asana api key" ) # Save github.com self . settings . apply ( 'api-github' , self . args . github_api , "enter github.com token" ) logging . debug ( "authenticating asana api." ) self . asana = Client . basic_auth ( self . settings [ 'api-asana' ] ) self . asana_errors = asana_errors self . asana_me = self . asana . users . me ( ) logging . debug ( "authenticating github api" ) self . github = Github ( self . settings [ 'api-github' ] ) self . github_user = self . github . get_user ( ) self . oauth = True
Connects to Github and Asana and authenticates via OAuth.
Connects to Github and Asana and authenticates via OAuth .