
Parsing and normalizing messy XML from stundenplan24.de, handling school-specific quirks; authenticated client, connection testing, robust cleanup logic and convenient school-data retrieval.
SP24.kt is a Kotlin library for building software that needs data from stundenplan24.de, developed by Indiware.
While working on VPlanPlus, we reverse-engineered the network requests used by stundenplan24.de and quickly realized the API isn’t exactly pleasant to deal with. During testing — and honestly still sometimes — we kept running into weird, school-specific quirks in the XML data it serves.
Since multiple apps need to work with this data reliably, we decided to move all the parsing and cleanup logic into a separate library. That way, we only have to deal with the messy stuff in one place, and updates can be rolled out everywhere just by bumping the version. As a nice bonus, others can use it too without going through the same headaches.
Checkout the latest release. Use
this version number in your libs.versions.toml or build.gradle.kts:
implementation("plus.vplan.lib:sp24-kt:VERSION")Documentation following soon. We'll dogfood this library in our own projects and improve and extend it as we go.
To get started, create a client.
val authentication = Authentication(
sp24SchoolId = "10000000",
username = "schueler",
password = "passwort"
)
val client = Stundenplan24Client(authentication = authentication)Having the client, you can load whatever you want. However, it's always a good idea to verify, whether the credentials match.
val result = client.testConnection() // Success, Error, InvalidCredentials or NotExistsSee TestConnection.kt from the tests for example.
Just to give you an idea, retrieving a schools name can involve multiple network requests, because not every school supports every feature. Some schools use modules that others don't, making standardized data complicated. But SP24.kt provides a convenient function.
val schoolName = (client.getSchoolName() as? Response.Success)?.dataSee SchoolNameTest.kt to learn mode.
SP24.kt is a Kotlin library for building software that needs data from stundenplan24.de, developed by Indiware.
While working on VPlanPlus, we reverse-engineered the network requests used by stundenplan24.de and quickly realized the API isn’t exactly pleasant to deal with. During testing — and honestly still sometimes — we kept running into weird, school-specific quirks in the XML data it serves.
Since multiple apps need to work with this data reliably, we decided to move all the parsing and cleanup logic into a separate library. That way, we only have to deal with the messy stuff in one place, and updates can be rolled out everywhere just by bumping the version. As a nice bonus, others can use it too without going through the same headaches.
Checkout the latest release. Use
this version number in your libs.versions.toml or build.gradle.kts:
implementation("plus.vplan.lib:sp24-kt:VERSION")Documentation following soon. We'll dogfood this library in our own projects and improve and extend it as we go.
To get started, create a client.
val authentication = Authentication(
sp24SchoolId = "10000000",
username = "schueler",
password = "passwort"
)
val client = Stundenplan24Client(authentication = authentication)Having the client, you can load whatever you want. However, it's always a good idea to verify, whether the credentials match.
val result = client.testConnection() // Success, Error, InvalidCredentials or NotExistsSee TestConnection.kt from the tests for example.
Just to give you an idea, retrieving a schools name can involve multiple network requests, because not every school supports every feature. Some schools use modules that others don't, making standardized data complicated. But SP24.kt provides a convenient function.
val schoolName = (client.getSchoolName() as? Response.Success)?.dataSee SchoolNameTest.kt to learn mode.