Returns a list of team information dictionaries
181424
def team_info():
    """"""
    teams = __get_league_object().find('teams').findall('team')
    output = []
    for team in teams:
        info = {}
        for x in team.attrib:
            info[x] = team.attrib[x]
        output.append(info)
    return output
719884
@Override
    public List<Team> getTeams() {
        List<Team> result = new ArrayList<>();
        try {
            String url = featureSettings.getJiraBaseUrl() + (featureSettings.getJiraBaseUrl().endsWith("/") ? "" : "/")
                    + TEMPO_TEAMS_REST_SUFFIX;
            ResponseEntity<String> responseEntity = makeRestCall(url);
            String responseBody = responseEntity.getBody();
            JSONArray teamsJson = (JSONArray) parser.parse(responseBody);
            if (teamsJson != null) {
                for (Object obj : teamsJson) {
                    JSONObject jo = (JSONObject) obj;
                    String teamId = getString(jo, "id");
                    String teamName = getString(jo, "name");
                    Team team = new Team(teamId, teamName);
                    team.setChangeDate("");
                    team.setTeamType("");
                    team.setAssetState("Active");
                    team.setIsDeleted("False");
                    result.add(team);
                }
            }
        } catch (ParseException pe) {
            LOGGER.error("Parser exception when parsing teams", pe);
        } catch (HygieiaException e) {
            LOGGER.error("Error in calling JIRA API", e);
        }
        return result;
    }
158431
def get_dict(self):
        
        return {
            'authors': self.authors,
            'date_download': self.date_download,
            'date_modify': self.date_modify,
            'date_publish': self.date_publish,
            'description': self.description,
            'filename': self.filename,
            'image_url': self.image_url,
            'language': self.language,
            'localpath': self.localpath,
            'source_domain': self.source_domain,
            'text': self.text,
            'title': self.title,
            'title_page': self.title_page,
            'title_rss': self.title_rss,
            'url': self.url
        }
692720
def current(self):
        
        rankings_dict = {}

        for team in self.current_extended:
            rankings_dict[team['abbreviation']] = team['rank']
        return rankings_dict
369646
def info_to_list(info):
    ''''''
    items = []
    for name, item in info.items():
        items.append((name, item['snake_name'], [
            type_from_proto[v['type']]['cpp'] for v in item.get('arguments', {}).values()]))
    return items
845808
def team_robots(self, team):
        
        return [Robot(raw) for raw in self._get('team/%s/robots' % self.team_key(team))]
1013627
def detail_dict(self):
        """"""

        d = self.dict

        def aug_col(c):
            d = c.dict
            d['stats'] = [s.dict for s in c.stats]
            return d

        d['table'] = self.table.dict
        d['table']['columns'] = [aug_col(c) for c in self.table.columns]

        return d
644914
def team_districts(self, team):
        
        return [District(raw) for raw in self._get('team/%s/districts' % self.team_key(team))]
1043775
def channels(self):
        
        resp = self._rtm_client.get('v1/current_team.channels')
        if resp.is_fail():
            raise RTMServiceError(
                'Failed to get channels of current team',
                resp
            )
        return resp.data['result']
1360670
def json_2_team(json_obj):
        
        LOGGER.debug("Team.json_2_team")
        return Team(teamid=json_obj['teamID'],
                    name=json_obj['teamName'],
                    description=json_obj['teamDescription'],
                    color_code=json_obj['teamColorCode'],
                    app_ids=json_obj['teamApplicationsID'],
                    osi_ids=json_obj['teamOSInstancesID'])
698209
def team(self):
        """"""
        team_dict = self._json_data.get('team')
        if team_dict and team_dict.get('id'):
            return self._client.team(id=team_dict.get('id'))
        else:
            return None
404537
def roster(team_id):
    """"""
    data = mlbgame.info.roster(team_id)
    return mlbgame.info.Roster(data)
1211519
def get_event_teams(self, id, **data):
        
        
        return self.get("/events/{0}/teams/".format(id), data=data)
1027405
def players(game_id):
    """"""
    # get data
    data = mlbgame.data.get_players(game_id)
    # parse data
    parsed = etree.parse(data)
    root = parsed.getroot()

    output = {}
    output['game_id'] = game_id

    # get player/coach data
    for team in root.findall('team'):
        type = team.attrib['type'] + "_team"
        # the type is either home_team or away_team
        output[type] = {}
        output[type]['players'] = []
        output[type]['coaches'] = []

        for p in team.findall('player'):
            player = {}
            for key in p.keys():
                player[key] = p.get(key)
            output[type]['players'].append(player)

        for c in team.findall('coach'):
            coach = {}
            for key in c.keys():
                coach[key] = c.get(key)
            output[type]['coaches'].append(coach)

    # get umpire data
    output['umpires'] = []
    for u in root.find('umpires').findall('umpire'):
        umpire = {}
        for key in u.keys():
            umpire[key] = u.get(key)
        output['umpires'].append(umpire)

    return output
252397
def info(self):
        
        result = dict()
        for name, namespace in self._namespaces.items():
            result[name] = namespace.info_all()
        return result
979602
def attrs(self):
        """"""
        ret = dict(self.__dict__) # obtain copy of internal __dict__
        del ret["_matches"] # match history is specifically distinguished from player information (and stored separately)
        if self.type != c.COMPUTER: # difficulty only matters for computer playres
            del ret["difficulty"]
        return ret
513985
def find_by_id(self, team, params={}, **options): 
        
        path = "/teams/%s" % (team)
        return self.client.get(path, params, **options)