Make possible to switch between api endpoints dynamically
This commit is contained in:
parent
91736bf8a0
commit
ebb54d067b
5 changed files with 410 additions and 127 deletions
|
@ -24,3 +24,4 @@ ktlint_standard_parameter-list-wrapping=disabled
|
||||||
ktlint_standard_discouraged-comment-location=disabled
|
ktlint_standard_discouraged-comment-location=disabled
|
||||||
ktlint_standard_if-else-wrapping=disabled
|
ktlint_standard_if-else-wrapping=disabled
|
||||||
ktlint_standard_property-naming=disabled
|
ktlint_standard_property-naming=disabled
|
||||||
|
ktlint_standard_class-naming=disabled
|
||||||
|
|
|
@ -1,58 +1,238 @@
|
||||||
package io.github.wulkanowy.sdk.scrapper
|
package io.github.wulkanowy.sdk.scrapper
|
||||||
|
|
||||||
internal object ApiEndpoints {
|
internal object ApiEndpoints : IApiEndpoints {
|
||||||
|
|
||||||
|
var currentVersion = 58666
|
||||||
|
|
||||||
|
private val endpoints
|
||||||
|
get() = when (currentVersion) {
|
||||||
|
in 58666..Int.MAX_VALUE -> ApiEndpoints_24_4_2_58666
|
||||||
|
else -> ApiEndpoints_24_4_1_58566
|
||||||
|
}
|
||||||
|
|
||||||
// uczen
|
// uczen
|
||||||
const val Autoryzacja = "00b61915-f3ec-421d-b7af-07aa8c4c162f"
|
override val Autoryzacja = endpoints.Autoryzacja
|
||||||
const val DostepOffice = "efa4a7ac-27bf-49af-90ff-ae0852339dd3"
|
override val DostepOffice = endpoints.DostepOffice
|
||||||
const val EgzaminySemestralne = "32915d4e-e542-4756-8c4b-c600f674f488"
|
override val EgzaminySemestralne = endpoints.EgzaminySemestralne
|
||||||
const val EgzaminyZewnetrzne = "9b48403a-cc4f-46a5-a51b-f04fea8753ee"
|
override val EgzaminyZewnetrzne = endpoints.EgzaminyZewnetrzne
|
||||||
const val EwidencjaObecnosci = "4ae4c4f5-209e-40e0-80db-3d77c484d528"
|
override val EwidencjaObecnosci = endpoints.EwidencjaObecnosci
|
||||||
const val FormularzeSzablony = "e36648d3-83fa-491b-8e91-5bea927120f1"
|
override val FormularzeSzablony = endpoints.FormularzeSzablony
|
||||||
const val FormularzeSzablonyDownload = "e1a812dd-9399-4354-aa5e-77304e042602"
|
override val FormularzeSzablonyDownload = endpoints.FormularzeSzablonyDownload
|
||||||
const val FormularzeWysylanie = "aa2d4eca-517c-4b53-ac44-8d5ea315bb7f"
|
override val FormularzeWysylanie = endpoints.FormularzeWysylanie
|
||||||
const val Frekwencja = "cc65835b-721d-4f4b-a316-799aed29c56f"
|
override val Frekwencja = endpoints.Frekwencja
|
||||||
const val FrekwencjaStatystyki = "a3ebd829-ee89-41c5-81c3-35a812c98640"
|
override val FrekwencjaStatystyki = endpoints.FrekwencjaStatystyki
|
||||||
const val FrekwencjaStatystykiPrzedmioty = "4c4133e2-cac7-444e-ab26-83501e5ddce5"
|
override val FrekwencjaStatystykiPrzedmioty = endpoints.FrekwencjaStatystykiPrzedmioty
|
||||||
const val Homework = "1dfb0cc9-584c-46c9-8f8b-bad061f9ebee"
|
override val Homework = endpoints.Homework
|
||||||
const val Jadlospis = "0c746ff5-f4cb-4537-b269-e3a4ac215eea"
|
override val Jadlospis = endpoints.Jadlospis
|
||||||
const val LekcjeZaplanowane = "3e8440cc-c832-45d9-abb4-3046977adb14"
|
override val LekcjeZaplanowane = endpoints.LekcjeZaplanowane
|
||||||
const val LekcjeZrealizowane = "9155e959-b2e7-4e05-9f2b-4773916b6dc2"
|
override val LekcjeZrealizowane = endpoints.LekcjeZrealizowane
|
||||||
const val Oceny = "42fd0eae-afaa-4772-ab73-66cdc1577649"
|
override val Oceny = endpoints.Oceny
|
||||||
const val Ogloszenia = "7e92f621-b90d-462e-ba6c-8b0110eb6494"
|
override val Ogloszenia = endpoints.Ogloszenia
|
||||||
const val Oplaty = "590bff89-a3ed-4bae-b0df-a18bdb1614e3"
|
override val Oplaty = endpoints.Oplaty
|
||||||
const val PlanZajec = "f6495353-4047-4752-91b6-ca202990e9e0"
|
override val PlanZajec = endpoints.PlanZajec
|
||||||
const val Platnosc = "4ba184c1-4419-4423-8864-8a6d7d1261c3"
|
override val Platnosc = endpoints.Platnosc
|
||||||
const val PlatnoscMetadata = "65c91912-8925-4bf2-b150-504324d781b8"
|
override val PlatnoscMetadata = endpoints.PlatnoscMetadata
|
||||||
const val PodrecznikiLataSzkolne = "862000c9-06a1-4505-b730-7fc3ed194007"
|
override val PodrecznikiLataSzkolne = endpoints.PodrecznikiLataSzkolne
|
||||||
const val PodrecznikiUcznia = "f65af6b8-1d86-4a47-9324-2c941eeb0140"
|
override val PodrecznikiUcznia = endpoints.PodrecznikiUcznia
|
||||||
const val Pomoc = "3380c914-a20d-44cd-9480-b2a64a3b5cf7"
|
override val Pomoc = endpoints.Pomoc
|
||||||
const val RejestracjaUrzadzeniaToken = "f51b7f8e-27fc-4522-aa87-fa881ee3afb8"
|
override val RejestracjaUrzadzeniaToken = endpoints.RejestracjaUrzadzeniaToken
|
||||||
const val RejestracjaUrzadzeniaTokenCertyfikat = "9fd15a23-2ec0-48be-8596-c46b7c30daac"
|
override val RejestracjaUrzadzeniaTokenCertyfikat = endpoints.RejestracjaUrzadzeniaTokenCertyfikat
|
||||||
const val RozpoczeciePlatnosci = "cd025374-b202-4efe-996c-18e074083775"
|
override val RozpoczeciePlatnosci = endpoints.RozpoczeciePlatnosci
|
||||||
const val ScalanieKont = "e4ac68c9-cf32-4ff6-be19-677cb5e5c255"
|
override val ScalanieKont = endpoints.ScalanieKont
|
||||||
const val Sprawdziany = "9bf0410c-aae5-447c-947e-49c815edbcb3"
|
override val Sprawdziany = endpoints.Sprawdziany
|
||||||
const val Statystyki = "dfa2d512-6682-414b-908b-6e208dfa0c6e"
|
override val Statystyki = endpoints.Statystyki
|
||||||
const val SzkolaINauczyciele = "b59d07c6-1146-4a50-ba6b-763ee8b151a3"
|
override val SzkolaINauczyciele = endpoints.SzkolaINauczyciele
|
||||||
const val Uczen = "a465bde1-9509-4706-bad2-658578482e04"
|
override val Uczen = endpoints.Uczen
|
||||||
const val UczenCache = "f18ddca0-400e-47cc-89a1-4bbe6685810b"
|
override val UczenCache = endpoints.UczenCache
|
||||||
const val UczenDziennik = "bef3daf1-07cd-4de6-b059-ee5909a7beb9"
|
override val UczenDziennik = endpoints.UczenDziennik
|
||||||
const val UczenZdjecie = "c1ba3b01-d53c-4577-98ab-4f1a620a3a35"
|
override val UczenZdjecie = endpoints.UczenZdjecie
|
||||||
const val Usprawiedliwienia = "863af74c-79aa-48f4-a0e6-aad168720dfd"
|
override val Usprawiedliwienia = endpoints.Usprawiedliwienia
|
||||||
const val UwagiIOsiagniecia = "6d869250-f637-4da0-a44b-c981299a55ce"
|
override val UwagiIOsiagniecia = endpoints.UwagiIOsiagniecia
|
||||||
const val ZarejestrowaneUrzadzenia = "bc9c2af4-fb13-4f9b-86e4-59ee12bfff85"
|
override val ZarejestrowaneUrzadzenia = endpoints.ZarejestrowaneUrzadzenia
|
||||||
const val Zebrania = "13fc67ca-19fc-4128-b8f0-41eed7f29838"
|
override val Zebrania = endpoints.Zebrania
|
||||||
const val ZebraniaObecnosc = "6ef8e1de-1234-4f39-9cd4-f68dabb8a440"
|
override val ZebraniaObecnosc = endpoints.ZebraniaObecnosc
|
||||||
const val ZgloszoneNieobecnosci = "80fe9dc2-8c36-41ea-8009-82503ff3c810"
|
override val ZgloszoneNieobecnosci = endpoints.ZgloszoneNieobecnosci
|
||||||
|
|
||||||
// wiadomosciplus
|
// wiadomosciplus
|
||||||
const val Skrzynki = "787817a4-bfa8-472c-b1ce-bbe324b308cf"
|
override val Skrzynki = endpoints.Skrzynki
|
||||||
const val Odebrane = "fa8d0cb9-742e-4f9f-b3e2-65b7d5cd7aa6"
|
override val Odebrane = endpoints.Odebrane
|
||||||
const val OdebraneSkrzynka = "9545648d-6534-4282-acb7-6e9cc52ab402"
|
override val OdebraneSkrzynka = endpoints.OdebraneSkrzynka
|
||||||
const val Wyslane = "962f3256-b82a-42bd-8f20-f03d79723516"
|
override val Wyslane = endpoints.Wyslane
|
||||||
const val WyslaneSkrzynka = "a046f45d-42ae-4072-9684-e957a797a22b"
|
override val WyslaneSkrzynka = endpoints.WyslaneSkrzynka
|
||||||
const val Usuniete = "94c2e642-b8e3-41f7-8428-27c3f213cb5d"
|
override val Usuniete = endpoints.Usuniete
|
||||||
const val UsunieteSkrzynka = "bae7f54c-f18e-4553-92d6-9a5f93392b39"
|
override val UsunieteSkrzynka = endpoints.UsunieteSkrzynka
|
||||||
const val WiadomoscOdpowiedzPrzekaz = "44444524-ba04-4259-8853-88343cf294be"
|
override val WiadomoscOdpowiedzPrzekaz = endpoints.WiadomoscOdpowiedzPrzekaz
|
||||||
const val MoveTrash = "b2131c71-8d76-4d93-9274-1d5b4f30c915"
|
override val MoveTrash = endpoints.MoveTrash
|
||||||
const val RestoreTrash = "e6de58f9-4db1-4cd2-afdf-ac9fcca37e43"
|
override val RestoreTrash = endpoints.RestoreTrash
|
||||||
|
}
|
||||||
|
|
||||||
|
internal interface IApiEndpoints {
|
||||||
|
// uczen
|
||||||
|
val Autoryzacja: String
|
||||||
|
val DostepOffice: String
|
||||||
|
val EgzaminySemestralne: String
|
||||||
|
val EgzaminyZewnetrzne: String
|
||||||
|
val EwidencjaObecnosci: String
|
||||||
|
val FormularzeSzablony: String
|
||||||
|
val FormularzeSzablonyDownload: String
|
||||||
|
val FormularzeWysylanie: String
|
||||||
|
val Frekwencja: String
|
||||||
|
val FrekwencjaStatystyki: String
|
||||||
|
val FrekwencjaStatystykiPrzedmioty: String
|
||||||
|
val Homework: String
|
||||||
|
val Jadlospis: String
|
||||||
|
val LekcjeZaplanowane: String
|
||||||
|
val LekcjeZrealizowane: String
|
||||||
|
val Oceny: String
|
||||||
|
val Ogloszenia: String
|
||||||
|
val Oplaty: String
|
||||||
|
val PlanZajec: String
|
||||||
|
val Platnosc: String
|
||||||
|
val PlatnoscMetadata: String
|
||||||
|
val PodrecznikiLataSzkolne: String
|
||||||
|
val PodrecznikiUcznia: String
|
||||||
|
val Pomoc: String
|
||||||
|
val RejestracjaUrzadzeniaToken: String
|
||||||
|
val RejestracjaUrzadzeniaTokenCertyfikat: String
|
||||||
|
val RozpoczeciePlatnosci: String
|
||||||
|
val ScalanieKont: String
|
||||||
|
val Sprawdziany: String
|
||||||
|
val Statystyki: String
|
||||||
|
val SzkolaINauczyciele: String
|
||||||
|
val Uczen: String
|
||||||
|
val UczenCache: String
|
||||||
|
val UczenDziennik: String
|
||||||
|
val UczenZdjecie: String
|
||||||
|
val Usprawiedliwienia: String
|
||||||
|
val UwagiIOsiagniecia: String
|
||||||
|
val ZarejestrowaneUrzadzenia: String
|
||||||
|
val Zebrania: String
|
||||||
|
val ZebraniaObecnosc: String
|
||||||
|
val ZgloszoneNieobecnosci: String
|
||||||
|
|
||||||
|
// wiadomosciplus
|
||||||
|
val Skrzynki: String
|
||||||
|
val Odebrane: String
|
||||||
|
val OdebraneSkrzynka: String
|
||||||
|
val Wyslane: String
|
||||||
|
val WyslaneSkrzynka: String
|
||||||
|
val Usuniete: String
|
||||||
|
val UsunieteSkrzynka: String
|
||||||
|
val WiadomoscOdpowiedzPrzekaz: String
|
||||||
|
val MoveTrash: String
|
||||||
|
val RestoreTrash: String
|
||||||
|
}
|
||||||
|
|
||||||
|
internal object ApiEndpoints_24_4_1_58566 : IApiEndpoints {
|
||||||
|
// uczen
|
||||||
|
override val Autoryzacja = "Autoryzacja"
|
||||||
|
override val DostepOffice = "DostepOffice"
|
||||||
|
override val EgzaminySemestralne = "EgzaminySemestralne"
|
||||||
|
override val EgzaminyZewnetrzne = "EgzaminyZewnetrzne"
|
||||||
|
override val EwidencjaObecnosci = "EwidencjaObecnosci"
|
||||||
|
override val FormularzeSzablony = "FormularzeSzablony"
|
||||||
|
override val FormularzeSzablonyDownload = "FormularzeSzablonyDownload"
|
||||||
|
override val FormularzeWysylanie = "FormularzeWysylanie"
|
||||||
|
override val Frekwencja = "Frekwencja"
|
||||||
|
override val FrekwencjaStatystyki = "FrekwencjaStatystyki"
|
||||||
|
override val FrekwencjaStatystykiPrzedmioty = "FrekwencjaStatystykiPrzedmioty"
|
||||||
|
override val Homework = "Homework"
|
||||||
|
override val Jadlospis = "Jadlospis"
|
||||||
|
override val LekcjeZaplanowane = "LekcjeZaplanowane"
|
||||||
|
override val LekcjeZrealizowane = "LekcjeZrealizowane"
|
||||||
|
override val Oceny = "Oceny"
|
||||||
|
override val Ogloszenia = "Ogloszenia"
|
||||||
|
override val Oplaty = "Oplaty"
|
||||||
|
override val PlanZajec = "PlanZajec"
|
||||||
|
override val Platnosc = "Platnosc"
|
||||||
|
override val PlatnoscMetadata = "PlatnoscMetadata"
|
||||||
|
override val PodrecznikiLataSzkolne = "PodrecznikiLataSzkolne"
|
||||||
|
override val PodrecznikiUcznia = "PodrecznikiUcznia"
|
||||||
|
override val Pomoc = "Pomoc"
|
||||||
|
override val RejestracjaUrzadzeniaToken = "RejestracjaUrzadzeniaToken"
|
||||||
|
override val RejestracjaUrzadzeniaTokenCertyfikat = "RejestracjaUrzadzeniaTokenCertyfikat"
|
||||||
|
override val RozpoczeciePlatnosci = "RozpoczeciePlatnosci"
|
||||||
|
override val ScalanieKont = "ScalanieKont"
|
||||||
|
override val Sprawdziany = "Sprawdziany"
|
||||||
|
override val Statystyki = "Statystyki"
|
||||||
|
override val SzkolaINauczyciele = "SzkolaINauczyciele"
|
||||||
|
override val Uczen = "Uczen"
|
||||||
|
override val UczenCache = "UczenCache"
|
||||||
|
override val UczenDziennik = "UczenDziennik"
|
||||||
|
override val UczenZdjecie = "UczenZdjecie"
|
||||||
|
override val Usprawiedliwienia = "Usprawiedliwienia"
|
||||||
|
override val UwagiIOsiagniecia = "UwagiIOsiagniecia"
|
||||||
|
override val ZarejestrowaneUrzadzenia = "ZarejestrowaneUrzadzenia"
|
||||||
|
override val Zebrania = "Zebrania"
|
||||||
|
override val ZebraniaObecnosc = "ZebraniaObecnosc"
|
||||||
|
override val ZgloszoneNieobecnosci = "ZgloszoneNieobecnosci"
|
||||||
|
|
||||||
|
// wiadomosciplus
|
||||||
|
override val Skrzynki = "Skrzynki"
|
||||||
|
override val Odebrane = "Odebrane"
|
||||||
|
override val OdebraneSkrzynka = "OdebraneSkrzynka"
|
||||||
|
override val Wyslane = "Wyslane"
|
||||||
|
override val WyslaneSkrzynka = "WyslaneSkrzynka"
|
||||||
|
override val Usuniete = "Usuniete"
|
||||||
|
override val UsunieteSkrzynka = "UsunieteSkrzynka"
|
||||||
|
override val WiadomoscOdpowiedzPrzekaz = "WiadomoscOdpowiedzPrzekaz"
|
||||||
|
override val MoveTrash = "MoveTrash"
|
||||||
|
override val RestoreTrash = "RestoreTrash"
|
||||||
|
}
|
||||||
|
|
||||||
|
internal object ApiEndpoints_24_4_2_58666 : IApiEndpoints {
|
||||||
|
// uczen
|
||||||
|
override val Autoryzacja = "00b61915-f3ec-421d-b7af-07aa8c4c162f"
|
||||||
|
override val DostepOffice = "efa4a7ac-27bf-49af-90ff-ae0852339dd3"
|
||||||
|
override val EgzaminySemestralne = "32915d4e-e542-4756-8c4b-c600f674f488"
|
||||||
|
override val EgzaminyZewnetrzne = "9b48403a-cc4f-46a5-a51b-f04fea8753ee"
|
||||||
|
override val EwidencjaObecnosci = "4ae4c4f5-209e-40e0-80db-3d77c484d528"
|
||||||
|
override val FormularzeSzablony = "e36648d3-83fa-491b-8e91-5bea927120f1"
|
||||||
|
override val FormularzeSzablonyDownload = "e1a812dd-9399-4354-aa5e-77304e042602"
|
||||||
|
override val FormularzeWysylanie = "aa2d4eca-517c-4b53-ac44-8d5ea315bb7f"
|
||||||
|
override val Frekwencja = "cc65835b-721d-4f4b-a316-799aed29c56f"
|
||||||
|
override val FrekwencjaStatystyki = "a3ebd829-ee89-41c5-81c3-35a812c98640"
|
||||||
|
override val FrekwencjaStatystykiPrzedmioty = "4c4133e2-cac7-444e-ab26-83501e5ddce5"
|
||||||
|
override val Homework = "1dfb0cc9-584c-46c9-8f8b-bad061f9ebee"
|
||||||
|
override val Jadlospis = "0c746ff5-f4cb-4537-b269-e3a4ac215eea"
|
||||||
|
override val LekcjeZaplanowane = "3e8440cc-c832-45d9-abb4-3046977adb14"
|
||||||
|
override val LekcjeZrealizowane = "9155e959-b2e7-4e05-9f2b-4773916b6dc2"
|
||||||
|
override val Oceny = "42fd0eae-afaa-4772-ab73-66cdc1577649"
|
||||||
|
override val Ogloszenia = "7e92f621-b90d-462e-ba6c-8b0110eb6494"
|
||||||
|
override val Oplaty = "590bff89-a3ed-4bae-b0df-a18bdb1614e3"
|
||||||
|
override val PlanZajec = "f6495353-4047-4752-91b6-ca202990e9e0"
|
||||||
|
override val Platnosc = "4ba184c1-4419-4423-8864-8a6d7d1261c3"
|
||||||
|
override val PlatnoscMetadata = "65c91912-8925-4bf2-b150-504324d781b8"
|
||||||
|
override val PodrecznikiLataSzkolne = "862000c9-06a1-4505-b730-7fc3ed194007"
|
||||||
|
override val PodrecznikiUcznia = "f65af6b8-1d86-4a47-9324-2c941eeb0140"
|
||||||
|
override val Pomoc = "3380c914-a20d-44cd-9480-b2a64a3b5cf7"
|
||||||
|
override val RejestracjaUrzadzeniaToken = "f51b7f8e-27fc-4522-aa87-fa881ee3afb8"
|
||||||
|
override val RejestracjaUrzadzeniaTokenCertyfikat = "9fd15a23-2ec0-48be-8596-c46b7c30daac"
|
||||||
|
override val RozpoczeciePlatnosci = "cd025374-b202-4efe-996c-18e074083775"
|
||||||
|
override val ScalanieKont = "e4ac68c9-cf32-4ff6-be19-677cb5e5c255"
|
||||||
|
override val Sprawdziany = "9bf0410c-aae5-447c-947e-49c815edbcb3"
|
||||||
|
override val Statystyki = "dfa2d512-6682-414b-908b-6e208dfa0c6e"
|
||||||
|
override val SzkolaINauczyciele = "b59d07c6-1146-4a50-ba6b-763ee8b151a3"
|
||||||
|
override val Uczen = "a465bde1-9509-4706-bad2-658578482e04"
|
||||||
|
override val UczenCache = "f18ddca0-400e-47cc-89a1-4bbe6685810b"
|
||||||
|
override val UczenDziennik = "bef3daf1-07cd-4de6-b059-ee5909a7beb9"
|
||||||
|
override val UczenZdjecie = "c1ba3b01-d53c-4577-98ab-4f1a620a3a35"
|
||||||
|
override val Usprawiedliwienia = "863af74c-79aa-48f4-a0e6-aad168720dfd"
|
||||||
|
override val UwagiIOsiagniecia = "6d869250-f637-4da0-a44b-c981299a55ce"
|
||||||
|
override val ZarejestrowaneUrzadzenia = "bc9c2af4-fb13-4f9b-86e4-59ee12bfff85"
|
||||||
|
override val Zebrania = "13fc67ca-19fc-4128-b8f0-41eed7f29838"
|
||||||
|
override val ZebraniaObecnosc = "6ef8e1de-1234-4f39-9cd4-f68dabb8a440"
|
||||||
|
override val ZgloszoneNieobecnosci = "80fe9dc2-8c36-41ea-8009-82503ff3c810"
|
||||||
|
|
||||||
|
// wiadomosciplus
|
||||||
|
override val Skrzynki = "787817a4-bfa8-472c-b1ce-bbe324b308cf"
|
||||||
|
override val Odebrane = "fa8d0cb9-742e-4f9f-b3e2-65b7d5cd7aa6"
|
||||||
|
override val OdebraneSkrzynka = "9545648d-6534-4282-acb7-6e9cc52ab402"
|
||||||
|
override val Wyslane = "962f3256-b82a-42bd-8f20-f03d79723516"
|
||||||
|
override val WyslaneSkrzynka = "a046f45d-42ae-4072-9684-e957a797a22b"
|
||||||
|
override val Usuniete = "94c2e642-b8e3-41f7-8428-27c3f213cb5d"
|
||||||
|
override val UsunieteSkrzynka = "bae7f54c-f18e-4553-92d6-9a5f93392b39"
|
||||||
|
override val WiadomoscOdpowiedzPrzekaz = "44444524-ba04-4259-8853-88343cf294be"
|
||||||
|
override val MoveTrash = "b2131c71-8d76-4d93-9274-1d5b4f30c915"
|
||||||
|
override val RestoreTrash = "e6de58f9-4db1-4cd2-afdf-ac9fcca37e43"
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,8 +47,12 @@ internal class MessagesRepository(
|
||||||
|
|
||||||
suspend fun getReceivedMessages(mailboxKey: String?, lastMessageKey: Int = 0, pageSize: Int = 50): List<MessageMeta> {
|
suspend fun getReceivedMessages(mailboxKey: String?, lastMessageKey: Int = 0, pageSize: Int = 50): List<MessageMeta> {
|
||||||
val messages = when (mailboxKey) {
|
val messages = when (mailboxKey) {
|
||||||
null -> api.getReceived(lastMessageKey, pageSize)
|
null -> api.getReceived(lastMessageKey = lastMessageKey, pageSize = pageSize)
|
||||||
else -> api.getReceivedMailbox(mailboxKey, lastMessageKey, pageSize)
|
else -> api.getReceivedMailbox(
|
||||||
|
mailboxKey = mailboxKey,
|
||||||
|
lastMessageKey = lastMessageKey,
|
||||||
|
pageSize = pageSize,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
return messages
|
return messages
|
||||||
|
@ -58,8 +62,8 @@ internal class MessagesRepository(
|
||||||
|
|
||||||
suspend fun getSentMessages(mailboxKey: String?, lastMessageKey: Int = 0, pageSize: Int = 50): List<MessageMeta> {
|
suspend fun getSentMessages(mailboxKey: String?, lastMessageKey: Int = 0, pageSize: Int = 50): List<MessageMeta> {
|
||||||
val messages = when (mailboxKey) {
|
val messages = when (mailboxKey) {
|
||||||
null -> api.getSent(lastMessageKey, pageSize)
|
null -> api.getSent(lastMessageKey = lastMessageKey, pageSize = pageSize)
|
||||||
else -> api.getSentMailbox(mailboxKey, lastMessageKey, pageSize)
|
else -> api.getSentMailbox(mailboxKey = mailboxKey, lastMessageKey = lastMessageKey, pageSize = pageSize)
|
||||||
}
|
}
|
||||||
return messages
|
return messages
|
||||||
.sortedBy { it.date }
|
.sortedBy { it.date }
|
||||||
|
@ -68,8 +72,12 @@ internal class MessagesRepository(
|
||||||
|
|
||||||
suspend fun getDeletedMessages(mailboxKey: String?, lastMessageKey: Int = 0, pageSize: Int = 50): List<MessageMeta> {
|
suspend fun getDeletedMessages(mailboxKey: String?, lastMessageKey: Int = 0, pageSize: Int = 50): List<MessageMeta> {
|
||||||
val messages = when (mailboxKey) {
|
val messages = when (mailboxKey) {
|
||||||
null -> api.getDeleted(lastMessageKey, pageSize)
|
null -> api.getDeleted(lastMessageKey = lastMessageKey, pageSize = pageSize)
|
||||||
else -> api.getDeletedMailbox(mailboxKey, lastMessageKey, pageSize)
|
else -> api.getDeletedMailbox(
|
||||||
|
mailboxKey = mailboxKey,
|
||||||
|
lastMessageKey = lastMessageKey,
|
||||||
|
pageSize = pageSize,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
return messages
|
return messages
|
||||||
.sortedBy { it.date }
|
.sortedBy { it.date }
|
||||||
|
@ -77,7 +85,7 @@ internal class MessagesRepository(
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun getMessageReplayDetails(globalKey: String): MessageReplayDetails {
|
suspend fun getMessageReplayDetails(globalKey: String): MessageReplayDetails {
|
||||||
return api.getMessageReplayDetails(globalKey).let {
|
return api.getMessageReplayDetails(globalKey = globalKey).let {
|
||||||
it.apply {
|
it.apply {
|
||||||
sender = Recipient(
|
sender = Recipient(
|
||||||
mailboxGlobalKey = it.senderMailboxId,
|
mailboxGlobalKey = it.senderMailboxId,
|
||||||
|
|
|
@ -14,6 +14,7 @@ import retrofit2.http.GET
|
||||||
import retrofit2.http.Header
|
import retrofit2.http.Header
|
||||||
import retrofit2.http.POST
|
import retrofit2.http.POST
|
||||||
import retrofit2.http.PUT
|
import retrofit2.http.PUT
|
||||||
|
import retrofit2.http.Path
|
||||||
import retrofit2.http.Query
|
import retrofit2.http.Query
|
||||||
import retrofit2.http.Url
|
import retrofit2.http.Url
|
||||||
|
|
||||||
|
@ -30,46 +31,52 @@ internal interface MessagesService {
|
||||||
@FieldMap certificate: Map<String, String>,
|
@FieldMap certificate: Map<String, String>,
|
||||||
): String
|
): String
|
||||||
|
|
||||||
@GET("api/${ApiEndpoints.Skrzynki}")
|
@GET("api/{path}")
|
||||||
suspend fun getMailboxes(): List<Mailbox>
|
suspend fun getMailboxes(@Path("path") path: String = ApiEndpoints.Skrzynki): List<Mailbox>
|
||||||
|
|
||||||
@GET("api/Pracownicy")
|
@GET("api/Pracownicy")
|
||||||
suspend fun getRecipients(@Query("globalKeySkrzynka") mailboxKey: String): List<Recipient>
|
suspend fun getRecipients(@Query("globalKeySkrzynka") mailboxKey: String): List<Recipient>
|
||||||
|
|
||||||
@GET("api/${ApiEndpoints.Odebrane}")
|
@GET("api/{path}")
|
||||||
suspend fun getReceived(
|
suspend fun getReceived(
|
||||||
|
@Path("path") path: String = ApiEndpoints.Odebrane,
|
||||||
@Query("idLastWiadomosc") lastMessageKey: Int = 0,
|
@Query("idLastWiadomosc") lastMessageKey: Int = 0,
|
||||||
@Query("pageSize") pageSize: Int = 50,
|
@Query("pageSize") pageSize: Int = 50,
|
||||||
): List<MessageMeta>
|
): List<MessageMeta>
|
||||||
|
|
||||||
@GET("api/${ApiEndpoints.OdebraneSkrzynka}")
|
@GET("api/{path}")
|
||||||
suspend fun getReceivedMailbox(
|
suspend fun getReceivedMailbox(
|
||||||
|
@Path("path") path: String = ApiEndpoints.OdebraneSkrzynka,
|
||||||
@Query("globalKeySkrzynka") mailboxKey: String,
|
@Query("globalKeySkrzynka") mailboxKey: String,
|
||||||
@Query("idLastWiadomosc") lastMessageKey: Int = 0,
|
@Query("idLastWiadomosc") lastMessageKey: Int = 0,
|
||||||
@Query("pageSize") pageSize: Int = 50,
|
@Query("pageSize") pageSize: Int = 50,
|
||||||
): List<MessageMeta>
|
): List<MessageMeta>
|
||||||
|
|
||||||
@GET("api/${ApiEndpoints.Wyslane}")
|
@GET("api/{path}")
|
||||||
suspend fun getSent(
|
suspend fun getSent(
|
||||||
|
@Path("path") path: String = ApiEndpoints.Wyslane,
|
||||||
@Query("idLastWiadomosc") lastMessageKey: Int = 0,
|
@Query("idLastWiadomosc") lastMessageKey: Int = 0,
|
||||||
@Query("pageSize") pageSize: Int = 50,
|
@Query("pageSize") pageSize: Int = 50,
|
||||||
): List<MessageMeta>
|
): List<MessageMeta>
|
||||||
|
|
||||||
@GET("api/${ApiEndpoints.WyslaneSkrzynka}")
|
@GET("api/{path}")
|
||||||
suspend fun getSentMailbox(
|
suspend fun getSentMailbox(
|
||||||
|
@Path("path") path: String = ApiEndpoints.WyslaneSkrzynka,
|
||||||
@Query("globalKeySkrzynka") mailboxKey: String,
|
@Query("globalKeySkrzynka") mailboxKey: String,
|
||||||
@Query("idLastWiadomosc") lastMessageKey: Int = 0,
|
@Query("idLastWiadomosc") lastMessageKey: Int = 0,
|
||||||
@Query("pageSize") pageSize: Int = 50,
|
@Query("pageSize") pageSize: Int = 50,
|
||||||
): List<MessageMeta>
|
): List<MessageMeta>
|
||||||
|
|
||||||
@GET("api/${ApiEndpoints.Usuniete}")
|
@GET("api/{path}")
|
||||||
suspend fun getDeleted(
|
suspend fun getDeleted(
|
||||||
|
@Path("path") path: String = ApiEndpoints.Usuniete,
|
||||||
@Query("idLastWiadomosc") lastMessageKey: Int = 0,
|
@Query("idLastWiadomosc") lastMessageKey: Int = 0,
|
||||||
@Query("pageSize") pageSize: Int = 50,
|
@Query("pageSize") pageSize: Int = 50,
|
||||||
): List<MessageMeta>
|
): List<MessageMeta>
|
||||||
|
|
||||||
@GET("api/${ApiEndpoints.UsunieteSkrzynka}")
|
@GET("api/{path}")
|
||||||
suspend fun getDeletedMailbox(
|
suspend fun getDeletedMailbox(
|
||||||
|
@Path("path") path: String = ApiEndpoints.UsunieteSkrzynka,
|
||||||
@Query("globalKeySkrzynka") mailboxKey: String,
|
@Query("globalKeySkrzynka") mailboxKey: String,
|
||||||
@Query("idLastWiadomosc") lastMessageKey: Int = 0,
|
@Query("idLastWiadomosc") lastMessageKey: Int = 0,
|
||||||
@Query("pageSize") pageSize: Int = 50,
|
@Query("pageSize") pageSize: Int = 50,
|
||||||
|
@ -81,17 +88,26 @@ internal interface MessagesService {
|
||||||
@PUT("api/WiadomoscSzczegoly")
|
@PUT("api/WiadomoscSzczegoly")
|
||||||
suspend fun markMessageAsRead(@Body body: Map<String, String>)
|
suspend fun markMessageAsRead(@Body body: Map<String, String>)
|
||||||
|
|
||||||
@GET("api/${ApiEndpoints.WiadomoscOdpowiedzPrzekaz}")
|
@GET("api/{path}")
|
||||||
suspend fun getMessageReplayDetails(@Query("apiGlobalKey") globalKey: String): MessageReplayDetails
|
suspend fun getMessageReplayDetails(
|
||||||
|
@Path("path") path: String = ApiEndpoints.WiadomoscOdpowiedzPrzekaz,
|
||||||
|
@Query("apiGlobalKey") globalKey: String,
|
||||||
|
): MessageReplayDetails
|
||||||
|
|
||||||
@POST("api/WiadomoscNowa")
|
@POST("api/WiadomoscNowa")
|
||||||
suspend fun sendMessage(@Body body: SendMessageRequest)
|
suspend fun sendMessage(@Body body: SendMessageRequest)
|
||||||
|
|
||||||
@POST("api/${ApiEndpoints.MoveTrash}")
|
@POST("api/{path}")
|
||||||
suspend fun moveMessageToTrash(@Body body: List<String>)
|
suspend fun moveMessageToTrash(
|
||||||
|
@Body body: List<String>,
|
||||||
|
@Path("path") path: String = ApiEndpoints.MoveTrash,
|
||||||
|
)
|
||||||
|
|
||||||
@POST("api/${ApiEndpoints.RestoreTrash}")
|
@POST("api/{path}")
|
||||||
suspend fun restoreFromTrash(@Body body: List<String>)
|
suspend fun restoreFromTrash(
|
||||||
|
@Body body: List<String>,
|
||||||
|
@Path("path") path: String = ApiEndpoints.RestoreTrash,
|
||||||
|
)
|
||||||
|
|
||||||
@POST("api/Delete")
|
@POST("api/Delete")
|
||||||
suspend fun deleteMessage(@Body body: List<String>)
|
suspend fun deleteMessage(@Body body: List<String>)
|
||||||
|
|
|
@ -44,6 +44,7 @@ import retrofit2.http.FormUrlEncoded
|
||||||
import retrofit2.http.GET
|
import retrofit2.http.GET
|
||||||
import retrofit2.http.Header
|
import retrofit2.http.Header
|
||||||
import retrofit2.http.POST
|
import retrofit2.http.POST
|
||||||
|
import retrofit2.http.Path
|
||||||
import retrofit2.http.Url
|
import retrofit2.http.Url
|
||||||
|
|
||||||
internal interface StudentService {
|
internal interface StudentService {
|
||||||
|
@ -71,87 +72,164 @@ internal interface StudentService {
|
||||||
@Body body: Any = Any(),
|
@Body body: Any = Any(),
|
||||||
): ApiResponse<CacheResponse>
|
): ApiResponse<CacheResponse>
|
||||||
|
|
||||||
@POST("${ApiEndpoints.UczenCache}.mvc/Get")
|
@POST("{path}.mvc/Get")
|
||||||
suspend fun getUserCache(@Body body: Any = Any()): ApiResponse<CacheResponse>
|
suspend fun getUserCache(
|
||||||
|
@Body body: Any = Any(),
|
||||||
|
@Path("path") path: String = ApiEndpoints.UczenCache,
|
||||||
|
): ApiResponse<CacheResponse>
|
||||||
|
|
||||||
@POST("${ApiEndpoints.Autoryzacja}.mvc/Post")
|
@POST("{path}.mvc/Post")
|
||||||
suspend fun authorizePermission(@Body body: AuthorizePermissionRequest): ApiResponse<AuthorizePermissionResponse>
|
suspend fun authorizePermission(
|
||||||
|
@Body body: AuthorizePermissionRequest,
|
||||||
|
@Path("path") path: String = ApiEndpoints.Autoryzacja,
|
||||||
|
): ApiResponse<AuthorizePermissionResponse>
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
suspend fun getSchoolInfo(@Url url: String, @Body body: Any = Any()): ApiResponse<List<Diary>>
|
suspend fun getSchoolInfo(@Url url: String, @Body body: Any = Any()): ApiResponse<List<Diary>>
|
||||||
|
|
||||||
@POST("${ApiEndpoints.UczenDziennik}.mvc/Get")
|
@POST("{path}.mvc/Get")
|
||||||
suspend fun getDiaries(@Body body: Any = Any()): ApiResponse<List<Diary>>
|
suspend fun getDiaries(
|
||||||
|
@Body body: Any = Any(),
|
||||||
|
@Path("path") path: String = ApiEndpoints.UczenDziennik,
|
||||||
|
): ApiResponse<List<Diary>>
|
||||||
|
|
||||||
@POST("${ApiEndpoints.Oceny}.mvc/Get")
|
@POST("{path}.mvc/Get")
|
||||||
suspend fun getGrades(@Body gradeRequest: GradeRequest): ApiResponse<GradesResponse>
|
suspend fun getGrades(
|
||||||
|
@Body gradeRequest: GradeRequest,
|
||||||
|
@Path("path") path: String = ApiEndpoints.Oceny,
|
||||||
|
): ApiResponse<GradesResponse>
|
||||||
|
|
||||||
@POST("${ApiEndpoints.Statystyki}.mvc/GetOcenyCzastkowe")
|
@POST("{path}.mvc/GetOcenyCzastkowe")
|
||||||
suspend fun getGradesPartialStatistics(@Body gradesStatisticsRequest: GradesStatisticsRequest): ApiResponse<List<GradesStatisticsPartial>>
|
suspend fun getGradesPartialStatistics(
|
||||||
|
@Body gradesStatisticsRequest: GradesStatisticsRequest,
|
||||||
|
@Path("path") path: String = ApiEndpoints.Statystyki,
|
||||||
|
): ApiResponse<List<GradesStatisticsPartial>>
|
||||||
|
|
||||||
@POST("${ApiEndpoints.Statystyki}.mvc/GetPunkty")
|
@POST("{path}.mvc/GetPunkty")
|
||||||
suspend fun getGradesPointsStatistics(@Body gradesStatisticsRequest: GradesStatisticsRequest): ApiResponse<GradePointsSummaryResponse>
|
suspend fun getGradesPointsStatistics(
|
||||||
|
@Body gradesStatisticsRequest: GradesStatisticsRequest,
|
||||||
|
@Path("path") path: String = ApiEndpoints.Statystyki,
|
||||||
|
): ApiResponse<GradePointsSummaryResponse>
|
||||||
|
|
||||||
@POST("${ApiEndpoints.Statystyki}.mvc/GetOcenyRoczne")
|
@POST("{path}.mvc/GetOcenyRoczne")
|
||||||
suspend fun getGradesAnnualStatistics(@Body gradesStatisticsRequest: GradesStatisticsRequest): ApiResponse<List<GradesStatisticsSemester>>
|
suspend fun getGradesAnnualStatistics(
|
||||||
|
@Body gradesStatisticsRequest: GradesStatisticsRequest,
|
||||||
|
@Path("path") path: String = ApiEndpoints.Statystyki,
|
||||||
|
): ApiResponse<List<GradesStatisticsSemester>>
|
||||||
|
|
||||||
@POST("${ApiEndpoints.Frekwencja}.mvc/Get")
|
@POST("{path}.mvc/Get")
|
||||||
suspend fun getAttendance(@Body attendanceRequest: AttendanceRequest): ApiResponse<AttendanceResponse>
|
suspend fun getAttendance(
|
||||||
|
@Body attendanceRequest: AttendanceRequest,
|
||||||
|
@Path("path") path: String = ApiEndpoints.Frekwencja,
|
||||||
|
): ApiResponse<AttendanceResponse>
|
||||||
|
|
||||||
@POST("${ApiEndpoints.FrekwencjaStatystyki}.mvc/Get")
|
@POST("{path}.mvc/Get")
|
||||||
suspend fun getAttendanceStatistics(@Body attendanceSummaryRequest: AttendanceSummaryRequest): ApiResponse<AttendanceSummaryResponse>
|
suspend fun getAttendanceStatistics(
|
||||||
|
@Body attendanceSummaryRequest: AttendanceSummaryRequest,
|
||||||
|
@Path("path") path: String = ApiEndpoints.FrekwencjaStatystyki,
|
||||||
|
): ApiResponse<AttendanceSummaryResponse>
|
||||||
|
|
||||||
@POST("${ApiEndpoints.FrekwencjaStatystykiPrzedmioty}.mvc/Get")
|
@POST("{path}.mvc/Get")
|
||||||
suspend fun getAttendanceSubjects(@Body body: Any = Any()): ApiResponse<List<Subject>>
|
suspend fun getAttendanceSubjects(
|
||||||
|
@Body body: Any = Any(),
|
||||||
|
@Path("path") path: String = ApiEndpoints.FrekwencjaStatystykiPrzedmioty,
|
||||||
|
): ApiResponse<List<Subject>>
|
||||||
|
|
||||||
@POST("${ApiEndpoints.EwidencjaObecnosci}.mvc/Get")
|
@POST("{path}.mvc/Get")
|
||||||
suspend fun getAttendanceRecords(@Body attendanceRecordsRequest: AttendanceRecordsRequest): ApiResponse<List<AttendanceRecordDay>>
|
suspend fun getAttendanceRecords(
|
||||||
|
@Body attendanceRecordsRequest: AttendanceRecordsRequest,
|
||||||
|
@Path("path") path: String = ApiEndpoints.EwidencjaObecnosci,
|
||||||
|
): ApiResponse<List<AttendanceRecordDay>>
|
||||||
|
|
||||||
@POST("${ApiEndpoints.Usprawiedliwienia}.mvc/Post")
|
@POST("{path}.mvc/Post")
|
||||||
suspend fun excuseForAbsence(@Body attendanceExcuseRequest: AttendanceExcuseRequest): ApiResponse<ApiResponse<String?>>
|
suspend fun excuseForAbsence(
|
||||||
|
@Body attendanceExcuseRequest: AttendanceExcuseRequest,
|
||||||
|
@Path("path") path: String = ApiEndpoints.Usprawiedliwienia,
|
||||||
|
): ApiResponse<ApiResponse<String?>>
|
||||||
|
|
||||||
@POST("${ApiEndpoints.EgzaminyZewnetrzne}.mvc/Get")
|
@POST("{path}.mvc/Get")
|
||||||
suspend fun getExternalExaminations()
|
suspend fun getExternalExaminations(
|
||||||
|
@Path("path") path: String = ApiEndpoints.EgzaminyZewnetrzne,
|
||||||
|
)
|
||||||
|
|
||||||
@POST("${ApiEndpoints.Sprawdziany}.mvc/Get")
|
@POST("{path}.mvc/Get")
|
||||||
suspend fun getExams(@Body examRequest: ExamRequest): ApiResponse<List<ExamResponse>>
|
suspend fun getExams(
|
||||||
|
@Body examRequest: ExamRequest,
|
||||||
|
@Path("path") path: String = ApiEndpoints.Sprawdziany,
|
||||||
|
): ApiResponse<List<ExamResponse>>
|
||||||
|
|
||||||
@POST("${ApiEndpoints.Homework}.mvc/Get")
|
@POST("{path}.mvc/Get")
|
||||||
suspend fun getHomework(@Body homeworkRequest: HomeworkRequest): ApiResponse<List<HomeworkDay>>
|
suspend fun getHomework(
|
||||||
|
@Body homeworkRequest: HomeworkRequest,
|
||||||
|
@Path("path") path: String = ApiEndpoints.Homework,
|
||||||
|
): ApiResponse<List<HomeworkDay>>
|
||||||
|
|
||||||
@POST("${ApiEndpoints.PlanZajec}.mvc/Get")
|
@POST("{path}.mvc/Get")
|
||||||
suspend fun getTimetable(@Body timetableRequest: TimetableRequest): ApiResponse<TimetableResponse>
|
suspend fun getTimetable(
|
||||||
|
@Body timetableRequest: TimetableRequest,
|
||||||
|
@Path("path") path: String = ApiEndpoints.PlanZajec,
|
||||||
|
): ApiResponse<TimetableResponse>
|
||||||
|
|
||||||
@POST("${ApiEndpoints.LekcjeZrealizowane}.mvc/GetPrzedmioty")
|
@POST("{path}.mvc/GetPrzedmioty")
|
||||||
suspend fun getRealizedSubjects(@Body body: Any = Any())
|
suspend fun getRealizedSubjects(
|
||||||
|
@Body body: Any = Any(),
|
||||||
|
@Path("path") path: String = ApiEndpoints.LekcjeZrealizowane,
|
||||||
|
)
|
||||||
|
|
||||||
@POST("${ApiEndpoints.LekcjeZrealizowane}.mvc/GetZrealizowane")
|
@POST("{path}.mvc/GetZrealizowane")
|
||||||
suspend fun getCompletedLessons(@Body completedLessonsRequest: CompletedLessonsRequest): ApiResponse<Map<String, List<CompletedLesson>>>
|
suspend fun getCompletedLessons(
|
||||||
|
@Body completedLessonsRequest: CompletedLessonsRequest,
|
||||||
|
@Path("path") path: String = ApiEndpoints.LekcjeZrealizowane,
|
||||||
|
): ApiResponse<Map<String, List<CompletedLesson>>>
|
||||||
|
|
||||||
@POST("${ApiEndpoints.UwagiIOsiagniecia}.mvc/Get")
|
@POST("{path}.mvc/Get")
|
||||||
suspend fun getNotes(@Body body: Any = Any()): ApiResponse<NotesResponse>
|
suspend fun getNotes(
|
||||||
|
@Body body: Any = Any(),
|
||||||
|
@Path("path") path: String = ApiEndpoints.UwagiIOsiagniecia,
|
||||||
|
): ApiResponse<NotesResponse>
|
||||||
|
|
||||||
@POST("${ApiEndpoints.Zebrania}.mvc/Get")
|
@POST("{path}.mvc/Get")
|
||||||
suspend fun getConferences(): ApiResponse<List<Conference>>
|
suspend fun getConferences(
|
||||||
|
@Path("path") path: String = ApiEndpoints.Zebrania,
|
||||||
|
): ApiResponse<List<Conference>>
|
||||||
|
|
||||||
@POST("${ApiEndpoints.Jadlospis}.mvc/Get")
|
@POST("{path}.mvc/Get")
|
||||||
suspend fun getMenu(@Body menuRequest: MenuRequest): ApiResponse<List<Menu>>
|
suspend fun getMenu(
|
||||||
|
@Body menuRequest: MenuRequest,
|
||||||
|
@Path("path") path: String = ApiEndpoints.Jadlospis,
|
||||||
|
): ApiResponse<List<Menu>>
|
||||||
|
|
||||||
@POST("${ApiEndpoints.ZarejestrowaneUrzadzenia}.mvc/Get")
|
@POST("{path}.mvc/Get")
|
||||||
suspend fun getRegisteredDevices(@Body body: Any = Any()): ApiResponse<List<Device>>
|
suspend fun getRegisteredDevices(
|
||||||
|
@Body body: Any = Any(),
|
||||||
|
@Path("path") path: String = ApiEndpoints.ZarejestrowaneUrzadzenia,
|
||||||
|
): ApiResponse<List<Device>>
|
||||||
|
|
||||||
@POST("${ApiEndpoints.RejestracjaUrzadzeniaToken}.mvc/Get")
|
@POST("{path}.mvc/Get")
|
||||||
suspend fun getToken(@Body body: Any = Any()): ApiResponse<TokenResponse>
|
suspend fun getToken(
|
||||||
|
@Body body: Any = Any(),
|
||||||
|
@Path("path") path: String = ApiEndpoints.ZarejestrowaneUrzadzenia,
|
||||||
|
): ApiResponse<TokenResponse>
|
||||||
|
|
||||||
@POST("${ApiEndpoints.ZarejestrowaneUrzadzenia}.mvc/Delete")
|
@POST("{path}.mvc/Delete")
|
||||||
suspend fun unregisterDevice(@Body unregisterDeviceRequest: UnregisterDeviceRequest): ApiResponse<Any>
|
suspend fun unregisterDevice(
|
||||||
|
@Body unregisterDeviceRequest: UnregisterDeviceRequest,
|
||||||
|
@Path("path") path: String = ApiEndpoints.ZarejestrowaneUrzadzenia,
|
||||||
|
): ApiResponse<Any>
|
||||||
|
|
||||||
@POST("${ApiEndpoints.SzkolaINauczyciele}.mvc/Get")
|
@POST("{path}.mvc/Get")
|
||||||
suspend fun getSchoolAndTeachers(@Body body: Any = Any()): ApiResponse<SchoolAndTeachersResponse>
|
suspend fun getSchoolAndTeachers(
|
||||||
|
@Body body: Any = Any(),
|
||||||
|
@Path("path") path: String = ApiEndpoints.SzkolaINauczyciele,
|
||||||
|
): ApiResponse<SchoolAndTeachersResponse>
|
||||||
|
|
||||||
@POST("${ApiEndpoints.Uczen}.mvc/Get")
|
@POST("{path}.mvc/Get")
|
||||||
suspend fun getStudentInfo(): ApiResponse<StudentInfo>
|
suspend fun getStudentInfo(
|
||||||
|
@Path("path") path: String = ApiEndpoints.Uczen,
|
||||||
|
): ApiResponse<StudentInfo>
|
||||||
|
|
||||||
@POST("${ApiEndpoints.UczenZdjecie}.mvc/Get")
|
@POST("{path}.mvc/Get")
|
||||||
suspend fun getStudentPhoto(): ApiResponse<StudentPhoto>
|
suspend fun getStudentPhoto(
|
||||||
|
@Path("path") path: String = ApiEndpoints.UczenZdjecie,
|
||||||
|
): ApiResponse<StudentPhoto>
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue