Get a listing of leagues for the specified team
@param teamId The id of the team
@return A list of leagues
@see <a href=https://developer.riotgames.com/api/methods#!/593/1860>Official API documentation</a>
491235
public Future<List<LeagueList>> getLeagues(String teamId) {
        return new ApiFuture<>(() -> handler.getLeagues(teamId));
    }
915232
function(teamId, req) {
        const favoritesList = req.app.locals.favoritesList
        if(favoritesList.find(t => t.id == teamId)) {
            const err = new Error('Team already exists in favorites!')
            err.status = 409
            throw err
        }
        return footballDb
            .getTeam(teamId)
            .then(team => {
                favoritesList.push(team)
                return {
                    id: teamId,
                    name: team.name,
                    layout: false
                }
            })
    }
1211519
def get_event_teams(self, id, **data):
        
        
        return self.get("/events/{0}/teams/".format(id), data=data)
42704
@RequestMapping(value = "/team/{teamId}", method = GET, produces = APPLICATION_JSON_VALUE)
    public DataResponse<Team> team(
            @RequestParam(value = "component", required = true) String cId,
            @PathVariable String teamId) {
        ObjectId componentId = new ObjectId(cId);
        return this.teamService.getTeam(componentId, teamId);
    }
994024
func (s *Service) TeamList(ctx context.Context, lr *ListRange) (TeamListResult, error) {
	var team TeamListResult
	return team, s.Get(ctx, &team, fmt.Sprintf("/teams"), nil, lr)
}
323131
def roster(team_id):
    """"""
    data = mlbgame.data.get_roster(team_id)
    parsed = json.loads(data.read().decode('utf-8'))
    players = parsed['roster_40']['queryResults']['row']
    return {'players': players, 'team_id': team_id}
240888
public function index($teamId)
    {
        $team = Team::findOrFail($teamId);
        $this->authorize('view', $team);
        return $this->respondRelatedAddresses($teamId, 'address');
    }
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'])
322452
public JSONObject getByTeamFull(String company, String team, HashMap<String, String> params) throws JSONException {
        return _getByType(company, team, null, params, false);
    }
353727
def list(self, teamId=None, rType=None, maxResults=C.MAX_RESULT_DEFAULT, limit=C.ALL):
    
    queryParams = {'teamId': teamId,
            'type': rType,
            'max': maxResults}
    queryParams = self.clean_query_Dict(queryParams)
    ret = self.send_request(C.GET, self.end, data=queryParams, limit=limit)
    return [Room(self.token, roomData) for roomData in ret['items']]
1298298
def get_teams(self):
        
        return self.make_request(host="erikberg.com", sport='nba',
                                 method="teams", id=None,
                                 format="json",
                                 parameters={})
1046279
@Override
    public Iterable<Team> getAllTeams() {
        // Get all available teams
        Iterable<Team> teams = teamRepository.findAll();

        for (Team team : teams) {
            Collector collector = collectorRepository
                    .findOne(team.getCollectorId());
            team.setCollector(collector);
        }

        return teams;
    }
581189
def map_team_id(code):
    """"""
    for team in TEAM_DATA:
        if team["code"] == code:
            click.secho(team["name"], fg="green")
            break
    else:
        click.secho("No team found for this code", fg="red", bold=True)
1172577
public function team($teamId)
	{
		$team = $this->info['teams'];
		if (isset($team[$teamId]))
		{
			return $team[$teamId];
		}

		return null;
	}
977551
public JSONObject getList(String company, String team) throws JSONException {
        return _getByType(company, team, null);
    }
1083915
def get_league_listing(self):
        
        url = self.__build_url(urls.GET_LEAGUE_LISTING)
        req = self.executor(url)
        if self.logger:
            self.logger.info('URL: {0}'.format(url))
        if not self.__check_http_err(req.status_code):
            return response.build(req, url, self.raw_mode)
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