(self)
Finds the preferred teams ID. The type of Team information variate throughout the API except for the team's id.
            Working with that will be much easier.

        :return: list of the preferred team's ID in order
Finds the preferred teams ID. The type of Team information variate throughout the API except for the team's id.
            Working with that will be much easier.
Finds the preferred teams ID . The type of Team information variate throughout the API except for the team s id . Working with that will be much easier .
def get_pref_teams_id(self):
        """
            Finds the preferred teams ID. The type of Team information variate throughout the API except for the team's id.
            Working with that will be much easier.

        :return: list of the preferred team's ID in order
        """
        try:
            allteams = self.teams
            pref_teams = self.config.preferred_teams
            allteams_id = {}
            pref_teams_id = []
            # Put all the team's in a dict with there name as KEY and ID as value.
            for team in allteams:
                allteams_id[team.team_name] = team.team_id

            # Go through the list of preferred teams name. If the team's name exist, put the ID in a new list.
            if pref_teams:
                for team in pref_teams:
                    if team in allteams_id:
                        pref_teams_id.append(allteams_id[team])
                    else:
                        debug.warning(team + " is not a team of the NHL. Make sure you typed team's name properly")

                return pref_teams_id
            else:
                return False
        except TypeError:
            return []
def get_pref_teams_id ( self ) : try : allteams = self . teams pref_teams = self . config . preferred_teams allteams_id = { } pref_teams_id = [ ] # Put all the team's in a dict with there name as KEY and ID as value. for team in allteams : allteams_id [ team . team_name ] = team . team_id # Go through the list of preferred teams name. If the team's name exist, put the ID in a new list. if pref_teams : for team in pref_teams : if team in allteams_id : pref_teams_id . append ( allteams_id [ team ] ) else : debug . warning ( team + " is not a team of the NHL. Make sure you typed team's name properly" ) return pref_teams_id else : return False except TypeError : return [ ]