clean up APICOntroller & new CacheController

* added a CacheController to hold all cache variables and clean up the APIController
* more consistent naming of variables
* update mensaMenu and courseList only if the request was successful
This commit is contained in:
2019-05-28 12:49:25 +02:00
parent 9efc7fe4b7
commit 754c8cb17b
7 changed files with 221 additions and 170 deletions

View File

@ -37,7 +37,7 @@ class TimetableParser {
*/
fun getTimeTable(timetableURL: String): TimetableWeek {
val timetableWeek = TimetableWeek()
val scheduleHTML = Jsoup.connect(timetableURL).get() // TODO add a tyr catch block to cover timeouts
val scheduleHTML = Jsoup.connect(timetableURL).get() // TODO add a try catch block to cover timeouts
//val week = scheduleHTML.select("h1.timetable-caption").text()
//println("$week successful!\n")