Korail (www.letskorail.com) wrapper for Kotlin.
This project was inspired from korail2 of carpedm20.
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.jcsla:korailsrt:aca933ffdd'
}
Korail.login("enter your korail membership id", "enter your password")
val searchTrainResult =
Korail.searchTrain(date = "20200122",
time = "192500",
trainType = TrainType.ALL.value,
adultCount = "1")
val reserveTicketResult =
Korail.reserveTicket(searchTrainResult.trn_infos.trn_info.first())
Jun-Young Lee / @jcsla