First Steps

Add to build.sbt the following content:

libraryDependencies += "com.quadstingray" % "openligadb" % "0.7.4"

The first thing you need is the Id for the league you are interested in. How you can find the id? Take a look here.. We take bl1 (German Bundesliga) for our sample.

So lets make some basic request!

Get the Current Season

val league = League("bl1")

val season = league.currentSeason

Get the specific Season

val league = League("bl1")

val season = league.currentSeason

Get the current Matches

Note

The current day is increased in each case half the time between the last game of the last match day and the first game of the next match day.

val league = League("bl1")

val matches = league.currentMatches

Get next Matches

val league = League("bl1")

val openLigaMatchOption: Option[MatchData] = league.nextMatch