Add default values for date fields in jspoon selectors
This commit is contained in:
parent
b6a33140d6
commit
8d6e12f41d
8 changed files with 8 additions and 8 deletions
|
@ -7,7 +7,7 @@ import java.util.*
|
|||
|
||||
class AttendanceResponse {
|
||||
|
||||
@Selector(".presentData thead th:not(:first-of-type)", regex = "\\s(.*)")
|
||||
@Selector(".presentData thead th:not(:first-of-type)", regex = "\\s(.*)", defValue = "01.01.1970")
|
||||
@Format("dd.MM.yyyy")
|
||||
var days: List<Date> = emptyList()
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ class Exam {
|
|||
|
||||
@SerializedName("DataModyfikacji")
|
||||
@Format("dd.MM.yyyy")
|
||||
@Selector(".wartosc", index = 3, regex = ".+, (.+)")
|
||||
@Selector(".wartosc", index = 3, regex = ".+, (.+)", defValue = "01.01.1970")
|
||||
lateinit var entryDate: Date
|
||||
|
||||
@SerializedName("DisplayValue")
|
||||
|
|
|
@ -17,7 +17,7 @@ class ExamResponse {
|
|||
|
||||
@SerializedName("Data")
|
||||
@Format("dd.MM.yyyy")
|
||||
@Selector("h2", regex = ".+, (.+)")
|
||||
@Selector("h2", regex = ".+, (.+)", defValue = "01.01.1970")
|
||||
lateinit var date: Date
|
||||
|
||||
@SerializedName("Sprawdziany")
|
||||
|
|
|
@ -11,7 +11,7 @@ class Homework {
|
|||
|
||||
@SerializedName("DataModyfikacji")
|
||||
@Format("dd.MM.yyyy")
|
||||
@Selector(".wartosc", index = 2, regex = ".+, (.+)")
|
||||
@Selector(".wartosc", index = 2, regex = ".+, (.+)", defValue = "01.01.1970")
|
||||
lateinit var entryDate: Date
|
||||
|
||||
@SerializedName("Przedmiot")
|
||||
|
|
|
@ -9,7 +9,7 @@ class HomeworkResponse {
|
|||
|
||||
@SerializedName("Data")
|
||||
@Format("dd.MM.yyyy")
|
||||
@Selector(".mainContainer h2:not(:contains(Brak))", regex = "\\s(.*)")
|
||||
@Selector(".mainContainer h2:not(:contains(Brak))", regex = "\\s(.*)", defValue = "01.01.1970")
|
||||
lateinit var date: Date
|
||||
|
||||
@SerializedName("ZadaniaDomowe")
|
||||
|
|
|
@ -17,6 +17,6 @@ class Device {
|
|||
|
||||
@SerializedName("DataUtworzenia")
|
||||
@Format(value = "dd.MM.yyyy 'godz:' HH:mm:ss")
|
||||
@Selector("td", index = 1)
|
||||
@Selector("td", index = 1, defValue = "01.01.1970")
|
||||
lateinit var date: Date
|
||||
}
|
||||
|
|
|
@ -12,6 +12,6 @@ class NotesResponse {
|
|||
var notes: List<Note> = listOf()
|
||||
|
||||
@Format("dd.MM.yyyy")
|
||||
@Selector(".mainContainer div:first-of-type h2:not(:contains(Brak))")
|
||||
@Selector(".mainContainer div:first-of-type h2:not(:contains(Brak))", defValue = "01.01.1970")
|
||||
var dates: List<Date> = listOf()
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.util.*
|
|||
|
||||
class TimetableResponse {
|
||||
|
||||
@Selector(".presentData thead th:not(:nth-of-type(1)):not(:nth-of-type(2))", regex = "\\s(.*)")
|
||||
@Selector(".presentData thead th:not(:nth-of-type(1)):not(:nth-of-type(2))", regex = "\\s(.*)", defValue = "01.01.1970")
|
||||
@Format("dd.MM.yyyy")
|
||||
var days: List<Date> = emptyList()
|
||||
|
||||
|
|
Loading…
Reference in a new issue