Open fijimf opened 9 years ago
import org.joda.time.DateTime
case class Ncaa(teams: List[Team] = List.empty, conferences: Set[Conference] = List.empty, schedules: List[Schedule] = List.empty)
case class Team(id: Long, keyName: String, name: String, nickname: String, extras: TeamExtras)
case class TeamExtras(longName: Option[String], color1: Option[String], color2: Option[String], logoURLBig: Option[String], logURLSmall: Option[String], websit: Option[String], twitter: Option[String], instagram: Option[String], facebook: Option[String])
case class Conference(id: Long, keyName: String, name: String)
case class Schedule(id: Long, academicYear: Int, name: String, conferenceMap: Map[Team, Conference], games: List[Game])
object Schedule {
def apply(year: Int) = Schedule(year, year, year + "-" + (year + 1), Map.empty[Team, Conference], List.empty[Game])
}
case class Game(datetime: DateTime, home: Team, away: Team, isNeutral: Boolean, result: Option[Result], extras: GameExtras)
case class Result(homeScore: Int, awayScore: Int, ots: Int = 0)
case class GameExtras(isConfTournament: Option[Boolean], isNcaaTournament: Option[Boolean], location: Option[String], attendence: Option[String], boxScore: Option[BoxScore])
case class BoxScore(x: String = "TODO")
// TODO
object Ncaa {
def main(args: Array[String]) {
List(2012, 2013, 2014, 2015).foreach(yr => {
val s = Schedule(yr)
val confs = loadConferences(yr)
confs.foreach(c=>{
val teams = loadTeams(yr,c)
teams.map(_->c)
})
})
}
}