public CandidateList getByDistrict(String districtId, String electionYear) throws VoteSmartException, VoteSmartErrorException {
    """
	This method grabs a list of candidates according to the district they represent.
	
	@param districtId
	@param electionYear
	@return {@link CandidateList}: list of detailed candidate information.
    """
		return api.query("Candidates.getByDistrict", new ArgMap("districtId", districtId, "electionYear", electionYear), CandidateList.class );
	}
public CandidateList getByDistrict(String districtId, String electionYear) throws VoteSmartException, VoteSmartErrorException {
		return api.query("Candidates.getByDistrict", new ArgMap("districtId", districtId, "electionYear", electionYear), CandidateList.class );
	}
public CandidateList getByDistrict ( String districtId , String electionYear ) throws VoteSmartException , VoteSmartErrorException { return api . query ( "Candidates.getByDistrict" , new ArgMap ( "districtId" , districtId , "electionYear" , electionYear ) , CandidateList . class ) ; }
This method grabs a list of candidates according to the district they represent.

@param districtId
@param electionYear
@return {@link CandidateList}: list of detailed candidate information.
This method grabs a list of candidates according to the district they represent .