Add default values for date fields in jspoon selectors

This commit is contained in:
Mikołaj Pich 2018-12-31 04:16:06 +01:00
parent b6a33140d6
commit 8d6e12f41d
No known key found for this signature in database
GPG key ID: F62B26E36D4C4BAA
8 changed files with 8 additions and 8 deletions

View file

@ -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()

View file

@ -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")

View file

@ -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")

View file

@ -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")

View file

@ -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")

View file

@ -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
}

View file

@ -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()
}

View file

@ -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()