luminoso_api/v4_client.py
def _get_default_account(self):
        """
        Get the ID of an account you can use to access projects.
        """
        newclient = self.__class__(self.session, self.root_url)
        account_info = newclient.get('/accounts/')
        if account_info['default_account'] is not None:
            return account_info['default_account']
        valid_accounts = [a['account_id'] for a in account_info['accounts']
                          if a['account_id'] != 'public']
        if len(valid_accounts) == 0:
            raise ValueError("Can't determine your default URL. "
                             "Please request a specific URL or ask "
                             "Luminoso for support.")
        return valid_accounts[0]
def _get_default_account(self):
        """
        Get the ID of an account you can use to access projects.
        """
        newclient = self.__class__(self.session, self.root_url)
        account_info = newclient.get('/accounts/')
        if account_info['default_account'] is not None:
            return account_info['default_account']
        valid_accounts = [a['account_id'] for a in account_info['accounts']
                          if a['account_id'] != 'public']
        if len(valid_accounts) == 0:
            raise ValueError("Can't determine your default URL. "
                             "Please request a specific URL or ask "
                             "Luminoso for support.")
        return valid_accounts[0]
def _get_default_account ( self ) : newclient = self . __class__ ( self . session , self . root_url ) account_info = newclient . get ( '/accounts/' ) if account_info [ 'default_account' ] is not None : return account_info [ 'default_account' ] valid_accounts = [ a [ 'account_id' ] for a in account_info [ 'accounts' ] if a [ 'account_id' ] != 'public' ] if len ( valid_accounts ) == 0 : raise ValueError ( "Can't determine your default URL. " "Please request a specific URL or ask " "Luminoso for support." ) return valid_accounts [ 0 ]
Get the ID of an account you can use to access projects.
Get the ID of an account you can use to access projects .