From e2150e3018158a07635a06fa19eef98c23d8531c Mon Sep 17 00:00:00 2001 From: Kacper Ziubryniewicz Date: Wed, 23 Oct 2019 22:53:06 +0200 Subject: [PATCH] [APIv2/Librus] Add Synergia endpoint template --- .../data/synergia/LibrusSynergiaTemplate.kt | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 app/src/main/java/pl/szczodrzynski/edziennik/api/v2/librus/data/synergia/LibrusSynergiaTemplate.kt diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/api/v2/librus/data/synergia/LibrusSynergiaTemplate.kt b/app/src/main/java/pl/szczodrzynski/edziennik/api/v2/librus/data/synergia/LibrusSynergiaTemplate.kt new file mode 100644 index 00000000..1cc0097e --- /dev/null +++ b/app/src/main/java/pl/szczodrzynski/edziennik/api/v2/librus/data/synergia/LibrusSynergiaTemplate.kt @@ -0,0 +1,25 @@ +/* + * Copyright (c) Kacper Ziubryniewicz 2019-10-23 + */ + +package pl.szczodrzynski.edziennik.api.v2.librus.data.synergia + +import org.jsoup.Jsoup +import pl.szczodrzynski.edziennik.api.v2.librus.DataLibrus +import pl.szczodrzynski.edziennik.api.v2.librus.data.LibrusSynergia +import pl.szczodrzynski.edziennik.data.db.modules.api.SYNC_ALWAYS + +class LibrusSynergiaTemplate(override val data: DataLibrus, val onSuccess: () -> Unit) : LibrusSynergia(data) { + companion object { + const val TAG = "LibrusSynergia" + } + + init { + /* synergiaGet(TAG, "") { text -> + val doc = Jsoup.parse(text) + + data.setSyncNext(ENDPOINT_LIBRUS_SYNERGIA_, SYNC_ALWAYS) + onSuccess() + } */ + } +}