Compare commits
1 commit
master
...
dependabot
Author | SHA1 | Date | |
---|---|---|---|
|
1a42bf7d1e |
9 changed files with 30 additions and 437 deletions
|
@ -3,7 +3,7 @@ plugins {
|
||||||
alias(libs.plugins.ksp) apply false
|
alias(libs.plugins.ksp) apply false
|
||||||
alias(libs.plugins.serialization)
|
alias(libs.plugins.serialization)
|
||||||
id "org.jlleitschuh.gradle.ktlint" version "12.1.0"
|
id "org.jlleitschuh.gradle.ktlint" version "12.1.0"
|
||||||
id "io.github.gradle-nexus.publish-plugin" version "1.3.0"
|
id "io.github.gradle-nexus.publish-plugin" version "2.0.0"
|
||||||
id 'ru.vyarus.mkdocs' version '3.0.0'
|
id 'ru.vyarus.mkdocs' version '3.0.0'
|
||||||
}
|
}
|
||||||
mkdocs.sourcesDir = 'docs'
|
mkdocs.sourcesDir = 'docs'
|
||||||
|
@ -18,7 +18,7 @@ ext {
|
||||||
moshi = "1.13.0"
|
moshi = "1.13.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
version = "2.7.0"
|
version = "2.6.13-SNAPSHOT"
|
||||||
group = "io.github.wulkanowy"
|
group = "io.github.wulkanowy"
|
||||||
|
|
||||||
nexusPublishing {
|
nexusPublishing {
|
||||||
|
|
|
@ -69,7 +69,6 @@ public final class io/github/wulkanowy/sdk/scrapper/Scrapper {
|
||||||
public static synthetic fun getReceivedMessages$default (Lio/github/wulkanowy/sdk/scrapper/Scrapper;Ljava/lang/String;IILkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
public static synthetic fun getReceivedMessages$default (Lio/github/wulkanowy/sdk/scrapper/Scrapper;Ljava/lang/String;IILkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||||
public final fun getRecipients (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
public final fun getRecipients (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||||
public final fun getRegisteredDevices (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
public final fun getRegisteredDevices (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||||
public final fun getResponseMapping ()Ljava/util/Map;
|
|
||||||
public final fun getSchool (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
public final fun getSchool (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||||
public final fun getSchoolId ()Ljava/lang/String;
|
public final fun getSchoolId ()Ljava/lang/String;
|
||||||
public final fun getSchoolYear ()I
|
public final fun getSchoolYear ()I
|
||||||
|
@ -117,7 +116,6 @@ public final class io/github/wulkanowy/sdk/scrapper/Scrapper {
|
||||||
public final fun setLogLevel (Lokhttp3/logging/HttpLoggingInterceptor$Level;)V
|
public final fun setLogLevel (Lokhttp3/logging/HttpLoggingInterceptor$Level;)V
|
||||||
public final fun setLoginType (Lio/github/wulkanowy/sdk/scrapper/Scrapper$LoginType;)V
|
public final fun setLoginType (Lio/github/wulkanowy/sdk/scrapper/Scrapper$LoginType;)V
|
||||||
public final fun setPassword (Ljava/lang/String;)V
|
public final fun setPassword (Ljava/lang/String;)V
|
||||||
public final fun setResponseMapping (Ljava/util/Map;)V
|
|
||||||
public final fun setSchoolId (Ljava/lang/String;)V
|
public final fun setSchoolId (Ljava/lang/String;)V
|
||||||
public final fun setSchoolYear (I)V
|
public final fun setSchoolYear (I)V
|
||||||
public final fun setSsl (Z)V
|
public final fun setSsl (Z)V
|
||||||
|
|
|
@ -583,10 +583,9 @@ internal val ApiEndpointsMap = mapOf(
|
||||||
"Pracownicy" to "89c9a7c2-e062-4d68-a66b-fb8406712351",
|
"Pracownicy" to "89c9a7c2-e062-4d68-a66b-fb8406712351",
|
||||||
"MoveTrash" to "85be0a03-b0c0-4f2c-bd0c-660bb8ed7262",
|
"MoveTrash" to "85be0a03-b0c0-4f2c-bd0c-660bb8ed7262",
|
||||||
"RestoreTrash" to "8aec05e6-218e-4917-9f0b-8baed1560435",
|
"RestoreTrash" to "8aec05e6-218e-4917-9f0b-8baed1560435",
|
||||||
"Delete" to "c2a7feca-f2f8-4c29-8182-ee60d8dc0f8f",
|
|
||||||
),
|
),
|
||||||
"uonetplus-uczen" to mapOf(
|
"uonetplus-uczen" to mapOf(
|
||||||
"Autoryzacja" to "325c0d1d-1b91-41e4-9bd9-7794ec90cca0",
|
// "Autoryzacja" to "",
|
||||||
"EgzaminyZewnetrzne" to "fe6b40ba-8a2f-4ad3-a519-343226a66a23",
|
"EgzaminyZewnetrzne" to "fe6b40ba-8a2f-4ad3-a519-343226a66a23",
|
||||||
"Frekwencja" to "c8dc2e1f-41e6-40c0-b04f-f49e3d5966ea",
|
"Frekwencja" to "c8dc2e1f-41e6-40c0-b04f-f49e3d5966ea",
|
||||||
"FrekwencjaStatystyki" to "fcefe7af-4324-4e70-ae42-c63dbe988099",
|
"FrekwencjaStatystyki" to "fcefe7af-4324-4e70-ae42-c63dbe988099",
|
||||||
|
@ -608,103 +607,11 @@ internal val ApiEndpointsMap = mapOf(
|
||||||
"UczenCache" to "333dce23-9766-4f2a-bc30-689bc04f0765",
|
"UczenCache" to "333dce23-9766-4f2a-bc30-689bc04f0765",
|
||||||
"UczenDziennik" to "6a523e4e-28dd-4123-98e5-ee10604f9e0b",
|
"UczenDziennik" to "6a523e4e-28dd-4123-98e5-ee10604f9e0b",
|
||||||
"UczenZdjecie" to "f3e2de45-912f-4d47-943f-25667b3e8a7b",
|
"UczenZdjecie" to "f3e2de45-912f-4d47-943f-25667b3e8a7b",
|
||||||
"Usprawiedliwienia" to "f13695db-b9d1-403e-8c7a-ad29b6e9ae7a",
|
// "Usprawiedliwienia" to "",
|
||||||
"UwagiIOsiagniecia" to "6ac1eafd-38c0-48ab-adce-75c5f901592c",
|
"UwagiIOsiagniecia" to "6ac1eafd-38c0-48ab-adce-75c5f901592c",
|
||||||
"ZarejestrowaneUrzadzenia" to "1d63088d-02da-4feb-8906-08172e5fea1c",
|
"ZarejestrowaneUrzadzenia" to "1d63088d-02da-4feb-8906-08172e5fea1c",
|
||||||
"Zebrania" to "2dd7a794-62d9-4711-b000-b73de88a7990",
|
"Zebrania" to "2dd7a794-62d9-4711-b000-b73de88a7990",
|
||||||
),
|
),
|
||||||
"uonetplus-uczenplus" to mapOf(
|
|
||||||
"Context" to "99f04f67-d7f6-4f30-9d02-61cdd656612f",
|
|
||||||
"AutoryzacjaPesel" to "febb23ab-090b-45d0-9c86-b65f44c2baf0",
|
|
||||||
"Frekwencja" to "604fd0c1-ce58-4b60-9603-6e219b473676",
|
|
||||||
"Usprawiedliwienia" to "640531d3-f986-4c1d-a6dd-d57847ca9cd8",
|
|
||||||
"FrekwencjaStatystyki" to "1d15fb9f-dda6-42e4-a571-e8e0c2ecad72",
|
|
||||||
"ZarejestrowaneUrzadzenia" to "ca848077-9fbc-4716-b0ed-17c84b4fc86b",
|
|
||||||
"RejestracjaUrzadzeniaToken" to "2c9fc7e4-aa35-4346-9cf1-ae50008a95cb",
|
|
||||||
"Zebrania" to "374625d5-fd26-4082-9fc2-dcf960e6c718",
|
|
||||||
"RealizacjaZajec" to "0fc3ce8b-efa0-434a-b1a6-e23580ce7e0e",
|
|
||||||
"SprawdzianyZadaniaDomowe" to "a5371f1b-db92-48a5-88e8-604c716c36a3",
|
|
||||||
"SprawdzianSzczegoly" to "3365341e-56ce-42e4-a5ee-3f5e30599e02",
|
|
||||||
"ZadanieDomoweSzczegoly" to "f636feab-3bdf-429d-8837-fec248ac6a27",
|
|
||||||
"PlanZajec" to "79ad9207-6132-427d-bbfa-62a7cff7735f",
|
|
||||||
"DniWolne" to "c537e0ea-3a28-40a0-b1d0-4cb051588727",
|
|
||||||
"Uwagi" to "281cb35f-3943-43a3-910d-32c9198da099",
|
|
||||||
"Nauczyciele" to "298c16b8-a257-4420-aa96-627c1d8957bf",
|
|
||||||
"Informacje" to "6773b9c9-bd7c-47fd-9df6-9501d29c40d7",
|
|
||||||
"DaneUcznia" to "c40b5a6f-4eb5-4b10-b35c-dc8e063ec6f8",
|
|
||||||
"UczenZdjecie" to "c031961d-3700-494f-bb29-522a54a7097f",
|
|
||||||
"OkresyKlasyfikacyjne" to "18428deb-8f85-4f97-99b0-0ec35178edcc",
|
|
||||||
"Oceny" to "83cbb389-f3ab-404d-8ecc-9e687b1b958c",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
"24.05.0000.59033" to mapOf(
|
|
||||||
"uonetplus-wiadomosciplus" to mapOf(
|
|
||||||
"Skrzynki" to "99d282b8-c52a-486f-b182-081f17ab575b",
|
|
||||||
"Odebrane" to "9a3adc9d-57c0-489a-96f4-17216ad7f39b",
|
|
||||||
"OdebraneSkrzynka" to "87002a35-79b5-4098-9217-2f4580ed5c4f",
|
|
||||||
"Wyslane" to "813de405-818e-4bea-bb27-bb9ca58e4b35",
|
|
||||||
"WyslaneSkrzynka" to "20fe222f-93ab-4862-ae1c-df4c6b91eed9",
|
|
||||||
"Usuniete" to "b7c90b28-9e16-4631-859b-416dc67988f4",
|
|
||||||
"UsunieteSkrzynka" to "845deb00-e600-420a-bec4-7f8424a09024",
|
|
||||||
"WiadomoscSzczegoly" to "69f036da-5615-4b31-af18-cec2f10d2f0e",
|
|
||||||
"WiadomoscOdpowiedzPrzekaz" to "05301b98-99e9-405e-b373-b6b475848191",
|
|
||||||
"WiadomoscNowa" to "47625b4d-8492-4177-bf98-e471e1e8345f",
|
|
||||||
"Pracownicy" to "89c9a7c2-e062-4d68-a66b-fb8406712351",
|
|
||||||
"MoveTrash" to "85be0a03-b0c0-4f2c-bd0c-660bb8ed7262",
|
|
||||||
"RestoreTrash" to "8aec05e6-218e-4917-9f0b-8baed1560435",
|
|
||||||
"Delete" to "c2a7feca-f2f8-4c29-8182-ee60d8dc0f8f",
|
|
||||||
),
|
|
||||||
"uonetplus-uczen" to mapOf(
|
|
||||||
"Autoryzacja" to "325c0d1d-1b91-41e4-9bd9-7794ec90cca0",
|
|
||||||
"EgzaminyZewnetrzne" to "fe6b40ba-8a2f-4ad3-a519-343226a66a23",
|
|
||||||
"Frekwencja" to "c8dc2e1f-41e6-40c0-b04f-f49e3d5966ea",
|
|
||||||
"FrekwencjaStatystyki" to "fcefe7af-4324-4e70-ae42-c63dbe988099",
|
|
||||||
"FrekwencjaStatystykiPrzedmioty" to "bb36d4b5-a481-43f7-aae6-89b004451911",
|
|
||||||
"Homework" to "250e6ac4-ab2c-4784-9110-112b6c7b0410",
|
|
||||||
"LekcjeZrealizowane.mvc/GetPrzedmioty" to "ca9358ca-bab9-4e35-85c9-2c8eb1691a6e.mvc/Get",
|
|
||||||
"LekcjeZrealizowane.mvc/GetZrealizowane" to "1a83b152-3160-43db-8683-0fd25c65b78a.mvc/Get",
|
|
||||||
"Oceny" to "837fd82d-3b34-4ef2-9b6c-bbb4032b6975",
|
|
||||||
"Ogloszenia" to "ff3e1b2d-9106-4842-91e1-8db7af1b7819",
|
|
||||||
"PlanZajec" to "dbef1773-0db6-4d08-9a5b-85146a06dfae",
|
|
||||||
"RejestracjaUrzadzeniaToken" to "e581158e-8ff5-4461-9c35-0d9389fbd651",
|
|
||||||
"RejestracjaUrzadzeniaTokenCertyfikat" to "afd176b2-d574-470c-b83e-77ab45dfa8a1",
|
|
||||||
"Sprawdziany" to "81037688-53b4-4f1e-ab43-bc5eabe72501",
|
|
||||||
"Statystyki.mvc/GetOcenyCzastkowe" to "c56368dc-3530-4960-94e2-2b5435732bae.mvc/Get",
|
|
||||||
"Statystyki.mvc/GetPunkty" to "387d3492-5d9d-44f5-b028-4948a16e3e42.mvc/Get",
|
|
||||||
"Statystyki.mvc/GetOcenyRoczne" to "462d4b6d-f1d2-4c4b-8ebc-1aee25c69354.mvc/Get",
|
|
||||||
"SzkolaINauczyciele" to "0e484bbe-bc2e-4f80-9bc8-7ee67097f426",
|
|
||||||
"Uczen" to "630cd54b-b952-43ee-aeb4-4438a2b21e75",
|
|
||||||
"UczenCache" to "333dce23-9766-4f2a-bc30-689bc04f0765",
|
|
||||||
"UczenDziennik" to "6a523e4e-28dd-4123-98e5-ee10604f9e0b",
|
|
||||||
"UczenZdjecie" to "f3e2de45-912f-4d47-943f-25667b3e8a7b",
|
|
||||||
"Usprawiedliwienia" to "f13695db-b9d1-403e-8c7a-ad29b6e9ae7a",
|
|
||||||
"UwagiIOsiagniecia" to "6ac1eafd-38c0-48ab-adce-75c5f901592c",
|
|
||||||
"ZarejestrowaneUrzadzenia" to "1d63088d-02da-4feb-8906-08172e5fea1c",
|
|
||||||
"Zebrania" to "2dd7a794-62d9-4711-b000-b73de88a7990",
|
|
||||||
),
|
|
||||||
"uonetplus-uczenplus" to mapOf(
|
|
||||||
"Context" to "99f04f67-d7f6-4f30-9d02-61cdd656612f",
|
|
||||||
"AutoryzacjaPesel" to "febb23ab-090b-45d0-9c86-b65f44c2baf0",
|
|
||||||
"Frekwencja" to "604fd0c1-ce58-4b60-9603-6e219b473676",
|
|
||||||
"Usprawiedliwienia" to "640531d3-f986-4c1d-a6dd-d57847ca9cd8",
|
|
||||||
"FrekwencjaStatystyki" to "1d15fb9f-dda6-42e4-a571-e8e0c2ecad72",
|
|
||||||
"ZarejestrowaneUrzadzenia" to "ca848077-9fbc-4716-b0ed-17c84b4fc86b",
|
|
||||||
"RejestracjaUrzadzeniaToken" to "2c9fc7e4-aa35-4346-9cf1-ae50008a95cb",
|
|
||||||
"Zebrania" to "374625d5-fd26-4082-9fc2-dcf960e6c718",
|
|
||||||
"RealizacjaZajec" to "0fc3ce8b-efa0-434a-b1a6-e23580ce7e0e",
|
|
||||||
"SprawdzianyZadaniaDomowe" to "a5371f1b-db92-48a5-88e8-604c716c36a3",
|
|
||||||
"SprawdzianSzczegoly" to "3365341e-56ce-42e4-a5ee-3f5e30599e02",
|
|
||||||
"ZadanieDomoweSzczegoly" to "f636feab-3bdf-429d-8837-fec248ac6a27",
|
|
||||||
"PlanZajec" to "79ad9207-6132-427d-bbfa-62a7cff7735f",
|
|
||||||
"DniWolne" to "c537e0ea-3a28-40a0-b1d0-4cb051588727",
|
|
||||||
"Uwagi" to "281cb35f-3943-43a3-910d-32c9198da099",
|
|
||||||
"Nauczyciele" to "298c16b8-a257-4420-aa96-627c1d8957bf",
|
|
||||||
"Informacje" to "6773b9c9-bd7c-47fd-9df6-9501d29c40d7",
|
|
||||||
"DaneUcznia" to "c40b5a6f-4eb5-4b10-b35c-dc8e063ec6f8",
|
|
||||||
"UczenZdjecie" to "c031961d-3700-494f-bb29-522a54a7097f",
|
|
||||||
"OkresyKlasyfikacyjne" to "18428deb-8f85-4f97-99b0-0ec35178edcc",
|
|
||||||
"Oceny" to "83cbb389-f3ab-404d-8ecc-9e687b1b958c",
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -865,9 +772,9 @@ internal val ApiEndpointsVTokenMap = mapOf(
|
||||||
),
|
),
|
||||||
"24.04.0010.58863" to mapOf(
|
"24.04.0010.58863" to mapOf(
|
||||||
"uonetplus-uczen" to mapOf(
|
"uonetplus-uczen" to mapOf(
|
||||||
"Autoryzacja.mvc" to "QIQqZdfpO",
|
"Context.mvc" to "",
|
||||||
"Frekwencja.mvc" to "FFWp52i",
|
"Frekwencja.mvc" to "FFWp52i",
|
||||||
"Usprawiedliwienia.mvc" to "wogKm",
|
"Usprawiedliwienia.mvc" to "",
|
||||||
"ZarejestrowaneUrzadzenia.mvc" to "M6VmD",
|
"ZarejestrowaneUrzadzenia.mvc" to "M6VmD",
|
||||||
"Zebrania.mvc" to "hkpEC",
|
"Zebrania.mvc" to "hkpEC",
|
||||||
"EgzaminyZewnetrzne.mvc" to "swrH0YR",
|
"EgzaminyZewnetrzne.mvc" to "swrH0YR",
|
||||||
|
@ -879,12 +786,22 @@ internal val ApiEndpointsVTokenMap = mapOf(
|
||||||
"Statystyki.mvc/GetPunkty" to "2ukYOklF",
|
"Statystyki.mvc/GetPunkty" to "2ukYOklF",
|
||||||
"Statystyki.mvc/GetOcenyRoczne" to "iPrK0ohLA",
|
"Statystyki.mvc/GetOcenyRoczne" to "iPrK0ohLA",
|
||||||
"LekcjeZrealizowane.mvc/GetPrzedmioty" to "Rxc0Zje7",
|
"LekcjeZrealizowane.mvc/GetPrzedmioty" to "Rxc0Zje7",
|
||||||
|
"RealizacjaZajec.mvc" to "",
|
||||||
"Sprawdziany.mvc" to "LQXXXOMQD",
|
"Sprawdziany.mvc" to "LQXXXOMQD",
|
||||||
|
"SprawdzianyZadaniaDomowe.mvc" to "",
|
||||||
|
"SprawdzianSzczegoly.mvc" to "",
|
||||||
|
"ZadanieDomoweSzczegoly.mvc" to "",
|
||||||
"PlanZajec.mvc" to "dFsnz4Tpjx",
|
"PlanZajec.mvc" to "dFsnz4Tpjx",
|
||||||
"RejestracjaUrzadzeniaToken.mvc" to "QiHSC",
|
"RejestracjaUrzadzeniaToken.mvc" to "QiHSC",
|
||||||
"RejestracjaUrzadzeniaTokenCertyfikat" to "JO6TnIxMW",
|
"RejestracjaUrzadzeniaTokenCertyfikat" to "JO6TnIxMW",
|
||||||
|
"DniWolne.mvc" to "",
|
||||||
|
"Uwagi.mvc" to "",
|
||||||
|
"Nauczyciele.mvc" to "",
|
||||||
|
"Informacje.mvc" to "",
|
||||||
|
"DaneUcznia.mvc" to "",
|
||||||
"UczenZdjecie.mvc" to "gCglTHSh2",
|
"UczenZdjecie.mvc" to "gCglTHSh2",
|
||||||
"Uczen.mvc" to "Qmj4F",
|
"Uczen.mvc" to "Qmj4F",
|
||||||
|
"OkresyKlasyfikacyjne.mvc" to "",
|
||||||
"UczenDziennik.mvc" to "Uh6DV",
|
"UczenDziennik.mvc" to "Uh6DV",
|
||||||
"UwagiIOsiagniecia.mvc" to "UcwhGmBp",
|
"UwagiIOsiagniecia.mvc" to "UcwhGmBp",
|
||||||
"UczenCache.mvc" to "1BzK3",
|
"UczenCache.mvc" to "1BzK3",
|
||||||
|
@ -892,27 +809,6 @@ internal val ApiEndpointsVTokenMap = mapOf(
|
||||||
"SzkolaINauczyciele.mvc" to "fWw8j4JOE",
|
"SzkolaINauczyciele.mvc" to "fWw8j4JOE",
|
||||||
"Ogloszenia.mvc" to "XKkaYNx",
|
"Ogloszenia.mvc" to "XKkaYNx",
|
||||||
),
|
),
|
||||||
"uonetplus-uczenplus" to mapOf(
|
|
||||||
"Context" to "aeRN",
|
|
||||||
"Frekwencja" to "ElWdgwf2ki",
|
|
||||||
"Usprawiedliwienia" to "nvlW",
|
|
||||||
"FrekwencjaStatystyki" to "dpJo",
|
|
||||||
"ZarejestrowaneUrzadzenia" to "YnPgEHfG",
|
|
||||||
"Zebrania" to "o4rvVwYB",
|
|
||||||
"RealizacjaZajec" to "K1KaR",
|
|
||||||
"SprawdzianyZadaniaDomowe" to "bX5ulTq4v",
|
|
||||||
"SprawdzianSzczegoly" to "ZZJHeiCbhw",
|
|
||||||
"ZadanieDomoweSzczegoly" to "yxAp3xo",
|
|
||||||
"PlanZajec" to "JpSGlO",
|
|
||||||
"DniWolne" to "ZxeNJWAk",
|
|
||||||
"Uwagi" to "u8SLfDJ",
|
|
||||||
"Nauczyciele" to "hCuAORdV",
|
|
||||||
"Informacje" to "0QwjEyw",
|
|
||||||
"DaneUcznia" to "6H06ch",
|
|
||||||
"UczenZdjecie" to "Jgftgt",
|
|
||||||
"OkresyKlasyfikacyjne" to "AmJ7o7",
|
|
||||||
"Oceny" to "Tm6DXpBUiG",
|
|
||||||
),
|
|
||||||
"uonetplus-wiadomosciplus" to mapOf(
|
"uonetplus-wiadomosciplus" to mapOf(
|
||||||
"Skrzynki" to "MevM",
|
"Skrzynki" to "MevM",
|
||||||
"Odebrane" to "KfA5",
|
"Odebrane" to "KfA5",
|
||||||
|
@ -923,201 +819,6 @@ internal val ApiEndpointsVTokenMap = mapOf(
|
||||||
"UsunieteSkrzynka" to "W8vyUYqP",
|
"UsunieteSkrzynka" to "W8vyUYqP",
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
"24.05.0000.59033" to mapOf(
|
|
||||||
"uonetplus-uczen" to mapOf(
|
|
||||||
"Autoryzacja.mvc" to "QIQqZdfpO",
|
|
||||||
"Frekwencja.mvc" to "FFWp52i",
|
|
||||||
"Usprawiedliwienia.mvc" to "wogKm",
|
|
||||||
"ZarejestrowaneUrzadzenia.mvc" to "M6VmD",
|
|
||||||
"Zebrania.mvc" to "hkpEC",
|
|
||||||
"EgzaminyZewnetrzne.mvc" to "swrH0YR",
|
|
||||||
"FrekwencjaStatystyki.mvc" to "hIyXiyb84",
|
|
||||||
"FrekwencjaStatystykiPrzedmioty.mvc" to "jJ4WL",
|
|
||||||
"LekcjeZrealizowane.mvc/GetZrealizowane" to "0Zbt",
|
|
||||||
"Oceny.mvc" to "RY5yLKL",
|
|
||||||
"Statystyki.mvc/GetOcenyCzastkowe" to "tvZiHv5mwi",
|
|
||||||
"Statystyki.mvc/GetPunkty" to "2ukYOklF",
|
|
||||||
"Statystyki.mvc/GetOcenyRoczne" to "iPrK0ohLA",
|
|
||||||
"LekcjeZrealizowane.mvc/GetPrzedmioty" to "Rxc0Zje7",
|
|
||||||
"Sprawdziany.mvc" to "LQXXXOMQD",
|
|
||||||
"PlanZajec.mvc" to "dFsnz4Tpjx",
|
|
||||||
"RejestracjaUrzadzeniaToken.mvc" to "QiHSC",
|
|
||||||
"RejestracjaUrzadzeniaTokenCertyfikat" to "JO6TnIxMW",
|
|
||||||
"UczenZdjecie.mvc" to "gCglTHSh2",
|
|
||||||
"Uczen.mvc" to "Qmj4F",
|
|
||||||
"UczenDziennik.mvc" to "Uh6DV",
|
|
||||||
"UwagiIOsiagniecia.mvc" to "UcwhGmBp",
|
|
||||||
"UczenCache.mvc" to "1BzK3",
|
|
||||||
"Homework.mvc" to "bQFjG",
|
|
||||||
"SzkolaINauczyciele.mvc" to "fWw8j4JOE",
|
|
||||||
"Ogloszenia.mvc" to "XKkaYNx",
|
|
||||||
),
|
|
||||||
"uonetplus-uczenplus" to mapOf(
|
|
||||||
"Context" to "aeRN",
|
|
||||||
"Frekwencja" to "ElWdgwf2ki",
|
|
||||||
"Usprawiedliwienia" to "nvlW",
|
|
||||||
"FrekwencjaStatystyki" to "dpJo",
|
|
||||||
"ZarejestrowaneUrzadzenia" to "YnPgEHfG",
|
|
||||||
"Zebrania" to "o4rvVwYB",
|
|
||||||
"RealizacjaZajec" to "K1KaR",
|
|
||||||
"SprawdzianyZadaniaDomowe" to "bX5ulTq4v",
|
|
||||||
"SprawdzianSzczegoly" to "ZZJHeiCbhw",
|
|
||||||
"ZadanieDomoweSzczegoly" to "yxAp3xo",
|
|
||||||
"PlanZajec" to "JpSGlO",
|
|
||||||
"DniWolne" to "ZxeNJWAk",
|
|
||||||
"Uwagi" to "u8SLfDJ",
|
|
||||||
"Nauczyciele" to "hCuAORdV",
|
|
||||||
"Informacje" to "0QwjEyw",
|
|
||||||
"DaneUcznia" to "6H06ch",
|
|
||||||
"UczenZdjecie" to "Jgftgt",
|
|
||||||
"OkresyKlasyfikacyjne" to "AmJ7o7",
|
|
||||||
"Oceny" to "Tm6DXpBUiG",
|
|
||||||
),
|
|
||||||
"uonetplus-wiadomosciplus" to mapOf(
|
|
||||||
"Skrzynki" to "MevM",
|
|
||||||
"Odebrane" to "KfA5",
|
|
||||||
"OdebraneSkrzynka" to "YhQzStvs3U",
|
|
||||||
"Wyslane" to "9pNDCfZWVU",
|
|
||||||
"WyslaneSkrzynka" to "9pTPrt",
|
|
||||||
"Usuniete" to "eu0uh61KM",
|
|
||||||
"UsunieteSkrzynka" to "W8vyUYqP",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
internal val ApiEndpointsResponseMapping = mapOf(
|
|
||||||
"24.04.0010.58863" to mapOf(
|
|
||||||
"uonetplus-wiadomosciplus" to mapOf(
|
|
||||||
"__common__" to mapOf(
|
|
||||||
"rtvrHBuCAwCEEAtIsBtuHJBtFttEtCIJ" to "apiGlobalKey",
|
|
||||||
"GFBGBsJGJFHvErwAswuGruutHHtuHEuG" to "data",
|
|
||||||
"IDJArEArvBsIErGDrsuEuGssHwsHGEts" to "hasZalaczniki",
|
|
||||||
"IDwrCCJDGFrHEuIFsvEvDDJwtBFECCHJ" to "id",
|
|
||||||
"AurrDtEJwwrEEwJtIJvEHHwICuBBDFGF" to "korespondenci",
|
|
||||||
"DBtuuvuGvEBsEAHAJrJECsDGuFrFsuGw" to "nieprzeczytanePrzeczytanePrzez",
|
|
||||||
"FuBsJwBvHErtEDAwJGuHCuIHJwBrrJFI" to "przeczytana",
|
|
||||||
"AuvBvruBGtGvEJHtIrsGvrIBDGAIFJCB" to "skrzynka",
|
|
||||||
"rtBCHvtsICwDEEFuJwvwJDCJBIAvAGCv" to "temat",
|
|
||||||
"twrCEIrHrsuGEIFIsCGEDJHDwrCICwBG" to "uzytkownikRola",
|
|
||||||
"AtAsGsuEIAurEGBAJBCGIIFsuwFrwsJt" to "wazna",
|
|
||||||
"twsrwAIrvGJFEutCrBrDvHCGwGHGCAGv" to "wycofana",
|
|
||||||
),
|
|
||||||
"Skrzynki" to mapOf(
|
|
||||||
"uwtBBGEJtGHCEEvvsuCJEtCJHCrustHu" to "globalKey",
|
|
||||||
"svttEIFJuuvGECBBrGCGtuuBFJBCAtGE" to "nazwa",
|
|
||||||
"BAICCDrJHtAEEtABrJFuFtvGuICrrCGC" to "typUzytkownika",
|
|
||||||
),
|
|
||||||
"WiadomoscSzczegoly" to mapOf(
|
|
||||||
"IvDDwGIurwIrEHDHIBvAvBEBvCsstBCC" to "apiGlobalKey",
|
|
||||||
"utFsEtBJsrEuEECBJDuuIEsvFDCsEIuv" to "data",
|
|
||||||
"DDAtuGHJBIEFErBArstDrsBAvIsvBHHs" to "dataWycofania",
|
|
||||||
"vFICGIHIAwvBEwIHrvstBvwvCJJIGwJE" to "id",
|
|
||||||
"DuJuEEvwFwAFEsAErCEtuIBtvwDsJutA" to "nadawca",
|
|
||||||
"DDAtuGHJBIEFErBArstDrsBAvIsvBHHs" to "nadawcaInfo",
|
|
||||||
"DGswFwrIGwFsEEFFrBDwvsrIsFHHCGst" to "nadawcaTyp",
|
|
||||||
"srBIECHwtJEuEJFIsBHBGsGIrHuBCJAu" to "odbiorcy",
|
|
||||||
"wwArFDurBrDFEvrAJGrsIIFADCswFuIE" to "odczytana",
|
|
||||||
"wuEwstuHDJCGEuEvsBJrEGFvIwvuvCJC" to "temat",
|
|
||||||
"BEDvtCIEBCGJEDGwswIFIvIuAHFDrAJI" to "tresc",
|
|
||||||
"HrvHItBsstFrEABGIDtuuGJJIGBECwFu" to "wycofana",
|
|
||||||
"GvtvvDBGvsAHEBsDsBJIJGtAtCvFswAI" to "zalaczniki",
|
|
||||||
|
|
||||||
// attachments
|
|
||||||
"CtItswwCCvwuEtEDsCGtAutIuuCABEBB" to "nazwaPliku",
|
|
||||||
"HCIICHrHBsvHECCAsFCEGGBsIFJvuHrt" to "url",
|
|
||||||
),
|
|
||||||
"WiadomoscOdpowiedzPrzekaz" to mapOf(
|
|
||||||
"AsrstFGtsDuuEsHCJFBDuICHHtCuwEuG" to "adresaci",
|
|
||||||
"CFHDJEstCsAvErGrJFCvvrvEJuABHFuD" to "apiGlobalKey",
|
|
||||||
"BArtutvvEurtEwBuJrvrCAHFIsFrJCJu" to "data",
|
|
||||||
"HtIFwvAFwsJIEAsrJIrJCEvGuIrrCAIG" to "id",
|
|
||||||
"AswHHvHvJDJsEIrJIHvrvDtCFErwBGtE" to "nadawcaInfo",
|
|
||||||
"BHuHEFHuDGHGEFIwsrssEIFBAuADsrFE" to "nadawcaSkrzynkaGlobalKey",
|
|
||||||
"DwGFGAHvJtvDEEGFstwICEwEBEDrAFID" to "nadawcaSkrzynkaNazwa",
|
|
||||||
"CHCsGwHIAIGJErwGsHJAHGBsArsDvBBG" to "temat",
|
|
||||||
"FJFFFtAFHJvvErrEssGBGIwDJGrEGwrH" to "tresc",
|
|
||||||
"AsvwvAGGJsCCECrGJJIAvIrtBtwBttFG" to "uzytkownikSkrzynkaGlobalKey",
|
|
||||||
"vvtvEJDDIFEGEuCIstEJsHIutAIDGrGJ" to "zalaczniki",
|
|
||||||
|
|
||||||
// recipients
|
|
||||||
"IAACDtCusJrAEJsuJICCvIDCHrrAvEtw" to "nazwa",
|
|
||||||
"BrHECCDIvBCJEvsIJtGJAHwBuAFIHDGG" to "skrzynkaGlobalKey",
|
|
||||||
|
|
||||||
// attachments
|
|
||||||
"vvwssJwwwHHEEuFEJtDEIIrwtrCuGJCH" to "id",
|
|
||||||
"FJFEEvAusIvBEvADIEEJwItwrvDtAsCD" to "idZewnetrzne",
|
|
||||||
"AwHsFrrwGIsAEHGCIsvJCtDICCCJItDF" to "nazwaPliku",
|
|
||||||
"wGBHDwCCFHssEJrFrIuIItFvuFtGtDBB" to "url",
|
|
||||||
"FvDrCwEBtwIvECBsIwIuAItCvBvGCvvB" to "zrodlo",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
"24.05.0000.59033" to mapOf(
|
|
||||||
"uonetplus-wiadomosciplus" to mapOf(
|
|
||||||
"__common__" to mapOf(
|
|
||||||
"rtvrHBuCAwCEEAtIsBtuHJBtFttEtCIJ" to "apiGlobalKey",
|
|
||||||
"GFBGBsJGJFHvErwAswuGruutHHtuHEuG" to "data",
|
|
||||||
"IDJArEArvBsIErGDrsuEuGssHwsHGEts" to "hasZalaczniki",
|
|
||||||
"IDwrCCJDGFrHEuIFsvEvDDJwtBFECCHJ" to "id",
|
|
||||||
"AurrDtEJwwrEEwJtIJvEHHwICuBBDFGF" to "korespondenci",
|
|
||||||
"DBtuuvuGvEBsEAHAJrJECsDGuFrFsuGw" to "nieprzeczytanePrzeczytanePrzez",
|
|
||||||
"FuBsJwBvHErtEDAwJGuHCuIHJwBrrJFI" to "przeczytana",
|
|
||||||
"AuvBvruBGtGvEJHtIrsGvrIBDGAIFJCB" to "skrzynka",
|
|
||||||
"rtBCHvtsICwDEEFuJwvwJDCJBIAvAGCv" to "temat",
|
|
||||||
"twrCEIrHrsuGEIFIsCGEDJHDwrCICwBG" to "uzytkownikRola",
|
|
||||||
"AtAsGsuEIAurEGBAJBCGIIFsuwFrwsJt" to "wazna",
|
|
||||||
"twsrwAIrvGJFEutCrBrDvHCGwGHGCAGv" to "wycofana",
|
|
||||||
),
|
|
||||||
"Skrzynki" to mapOf(
|
|
||||||
"uwtBBGEJtGHCEEvvsuCJEtCJHCrustHu" to "globalKey",
|
|
||||||
"svttEIFJuuvGECBBrGCGtuuBFJBCAtGE" to "nazwa",
|
|
||||||
"BAICCDrJHtAEEtABrJFuFtvGuICrrCGC" to "typUzytkownika",
|
|
||||||
),
|
|
||||||
"WiadomoscSzczegoly" to mapOf(
|
|
||||||
"IvDDwGIurwIrEHDHIBvAvBEBvCsstBCC" to "apiGlobalKey",
|
|
||||||
"utFsEtBJsrEuEECBJDuuIEsvFDCsEIuv" to "data",
|
|
||||||
"DDAtuGHJBIEFErBArstDrsBAvIsvBHHs" to "dataWycofania",
|
|
||||||
"vFICGIHIAwvBEwIHrvstBvwvCJJIGwJE" to "id",
|
|
||||||
"DuJuEEvwFwAFEsAErCEtuIBtvwDsJutA" to "nadawca",
|
|
||||||
"DDAtuGHJBIEFErBArstDrsBAvIsvBHHs" to "nadawcaInfo",
|
|
||||||
"DGswFwrIGwFsEEFFrBDwvsrIsFHHCGst" to "nadawcaTyp",
|
|
||||||
"srBIECHwtJEuEJFIsBHBGsGIrHuBCJAu" to "odbiorcy",
|
|
||||||
"wwArFDurBrDFEvrAJGrsIIFADCswFuIE" to "odczytana",
|
|
||||||
"wuEwstuHDJCGEuEvsBJrEGFvIwvuvCJC" to "temat",
|
|
||||||
"BEDvtCIEBCGJEDGwswIFIvIuAHFDrAJI" to "tresc",
|
|
||||||
"HrvHItBsstFrEABGIDtuuGJJIGBECwFu" to "wycofana",
|
|
||||||
"GvtvvDBGvsAHEBsDsBJIJGtAtCvFswAI" to "zalaczniki",
|
|
||||||
|
|
||||||
// attachments
|
|
||||||
"CtItswwCCvwuEtEDsCGtAutIuuCABEBB" to "nazwaPliku",
|
|
||||||
"HCIICHrHBsvHECCAsFCEGGBsIFJvuHrt" to "url",
|
|
||||||
),
|
|
||||||
"WiadomoscOdpowiedzPrzekaz" to mapOf(
|
|
||||||
"AsrstFGtsDuuEsHCJFBDuICHHtCuwEuG" to "adresaci",
|
|
||||||
"CFHDJEstCsAvErGrJFCvvrvEJuABHFuD" to "apiGlobalKey",
|
|
||||||
"BArtutvvEurtEwBuJrvrCAHFIsFrJCJu" to "data",
|
|
||||||
"HtIFwvAFwsJIEAsrJIrJCEvGuIrrCAIG" to "id",
|
|
||||||
"AswHHvHvJDJsEIrJIHvrvDtCFErwBGtE" to "nadawcaInfo",
|
|
||||||
"BHuHEFHuDGHGEFIwsrssEIFBAuADsrFE" to "nadawcaSkrzynkaGlobalKey",
|
|
||||||
"DwGFGAHvJtvDEEGFstwICEwEBEDrAFID" to "nadawcaSkrzynkaNazwa",
|
|
||||||
"CHCsGwHIAIGJErwGsHJAHGBsArsDvBBG" to "temat",
|
|
||||||
"FJFFFtAFHJvvErrEssGBGIwDJGrEGwrH" to "tresc",
|
|
||||||
"AsvwvAGGJsCCECrGJJIAvIrtBtwBttFG" to "uzytkownikSkrzynkaGlobalKey",
|
|
||||||
"vvtvEJDDIFEGEuCIstEJsHIutAIDGrGJ" to "zalaczniki",
|
|
||||||
|
|
||||||
// recipients
|
|
||||||
"IAACDtCusJrAEJsuJICCvIDCHrrAvEtw" to "nazwa",
|
|
||||||
"BrHECCDIvBCJEvsIJtGJAHwBuAFIHDGG" to "skrzynkaGlobalKey",
|
|
||||||
|
|
||||||
// attachments
|
|
||||||
"vvwssJwwwHHEEuFEJtDEIIrwtrCuGJCH" to "id",
|
|
||||||
"FJFEEvAusIvBEvADIEEJwItwrvDtAsCD" to "idZewnetrzne",
|
|
||||||
"AwHsFrrwGIsAEHGCIsvJCtDICCCJItDF" to "nazwaPliku",
|
|
||||||
"wGBHDwCCFHssEJrFrIuIItFvuFtGtDBB" to "url",
|
|
||||||
"FvDrCwEBtwIvECBsIwIuAItCvBvGCvvB" to "zrodlo",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
internal val ApiEndpointsVHeaders = mapOf(
|
internal val ApiEndpointsVHeaders = mapOf(
|
||||||
|
@ -1172,19 +873,5 @@ internal val ApiEndpointsVHeaders = mapOf(
|
||||||
"uonetplus-uczen" to mapOf(
|
"uonetplus-uczen" to mapOf(
|
||||||
"V-TokenApi" to "{%UUID%}-{%vTokenApiIndexed%}",
|
"V-TokenApi" to "{%UUID%}-{%vTokenApiIndexed%}",
|
||||||
),
|
),
|
||||||
"uonetplus-uczenplus" to mapOf(
|
|
||||||
"V-TokenApi" to "{UUID}-{appCustomerDb}-{appCustomerDbSig}-{appVersion}-{apiKey}",
|
|
||||||
),
|
|
||||||
),
|
|
||||||
"24.05.0000.59033" to mapOf(
|
|
||||||
"uonetplus-wiadomosciplus" to mapOf(
|
|
||||||
"V-TokenApi" to "{UUID}-{appCustomerDb}-{appCustomerDbSig}-{apiKey}",
|
|
||||||
),
|
|
||||||
"uonetplus-uczen" to mapOf(
|
|
||||||
"V-TokenApi" to "{%UUID%}-{%vTokenApiIndexed%}",
|
|
||||||
),
|
|
||||||
"uonetplus-uczenplus" to mapOf(
|
|
||||||
"V-TokenApi" to "{UUID}-{appCustomerDb}-{appCustomerDbSig}-{apiKey}",
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
|
@ -230,12 +230,6 @@ class Scrapper {
|
||||||
vHeadersMap = value
|
vHeadersMap = value
|
||||||
}
|
}
|
||||||
|
|
||||||
var responseMapping: Map<String, Map<String, Map<String, Map<String, String>>>>
|
|
||||||
get() = responseMap
|
|
||||||
set(value) {
|
|
||||||
responseMap = value
|
|
||||||
}
|
|
||||||
|
|
||||||
var vParamsEvaluation: suspend () -> EvaluateHandler
|
var vParamsEvaluation: suspend () -> EvaluateHandler
|
||||||
get() = vParamsRun
|
get() = vParamsRun
|
||||||
set(value) {
|
set(value) {
|
||||||
|
@ -246,7 +240,6 @@ class Scrapper {
|
||||||
var endpointsMap: Map<String, Map<String, Map<String, String>>> = ApiEndpointsMap
|
var endpointsMap: Map<String, Map<String, Map<String, String>>> = ApiEndpointsMap
|
||||||
var vTokenMap: Map<String, Map<String, Map<String, String>>> = ApiEndpointsVTokenMap
|
var vTokenMap: Map<String, Map<String, Map<String, String>>> = ApiEndpointsVTokenMap
|
||||||
var vHeadersMap: Map<String, Map<String, Map<String, String>>> = ApiEndpointsVHeaders
|
var vHeadersMap: Map<String, Map<String, Map<String, String>>> = ApiEndpointsVHeaders
|
||||||
var responseMap: Map<String, Map<String, Map<String, Map<String, String>>>> = ApiEndpointsResponseMapping
|
|
||||||
var vParamsRun: suspend () -> EvaluateHandler = { object : EvaluateHandler {} }
|
var vParamsRun: suspend () -> EvaluateHandler = { object : EvaluateHandler {} }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -160,7 +160,7 @@ internal fun Recipient.toMailbox() = Mailbox(
|
||||||
internal fun String.capitalise() = replaceFirstChar { if (it.isLowerCase()) it.titlecase() else it.toString() }
|
internal fun String.capitalise() = replaceFirstChar { if (it.isLowerCase()) it.titlecase() else it.toString() }
|
||||||
|
|
||||||
internal val defaultUserAgentTemplate = buildString {
|
internal val defaultUserAgentTemplate = buildString {
|
||||||
append("Mozilla/5.0 (Linux; Androidx %1\$s; %2\$s) ")
|
append("Mozilla/5.0 (Linux; Android %1\$s; %2\$s) ")
|
||||||
append("AppleWebKit/%3\$s (KHTML, like Gecko) ")
|
append("AppleWebKit/%3\$s (KHTML, like Gecko) ")
|
||||||
append("Chrome/%4\$s Mobile ")
|
append("Chrome/%4\$s Mobile ")
|
||||||
append("Safari/%5\$s")
|
append("Safari/%5\$s")
|
||||||
|
@ -171,7 +171,7 @@ internal fun getFormattedString(
|
||||||
androidVersion: String,
|
androidVersion: String,
|
||||||
buildTag: String,
|
buildTag: String,
|
||||||
webKitRev: String = "537.36",
|
webKitRev: String = "537.36",
|
||||||
chromeRev: String = "125.0.0.0",
|
chromeRev: String = "120.0.0.0",
|
||||||
): String {
|
): String {
|
||||||
return String.format(template, androidVersion, buildTag, webKitRev, chromeRev, webKitRev)
|
return String.format(template, androidVersion, buildTag, webKitRev, chromeRev, webKitRev)
|
||||||
}
|
}
|
||||||
|
@ -332,15 +332,6 @@ internal suspend fun getModuleHeadersFromDocument(document: Document): ModuleHea
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun getModuleHost(url: HttpUrl): String {
|
|
||||||
return when {
|
|
||||||
MessagesModuleHost in url.host -> MessagesModuleHost
|
|
||||||
StudentPlusModuleHost in url.host -> StudentPlusModuleHost
|
|
||||||
StudentModuleHost in url.host -> StudentModuleHost
|
|
||||||
else -> ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
internal fun getVHeaders(moduleHost: String, url: HttpUrl, headers: ModuleHeaders?): Map<String, String> {
|
internal fun getVHeaders(moduleHost: String, url: HttpUrl, headers: ModuleHeaders?): Map<String, String> {
|
||||||
val vHeaders = Scrapper.vHeadersMap[headers?.appVersion] ?: ApiEndpointsVHeaders[headers?.appVersion]
|
val vHeaders = Scrapper.vHeadersMap[headers?.appVersion] ?: ApiEndpointsVHeaders[headers?.appVersion]
|
||||||
|
|
||||||
|
|
|
@ -36,13 +36,13 @@ internal data class GradesResponse(
|
||||||
internal data class GradesSettings(
|
internal data class GradesSettings(
|
||||||
|
|
||||||
@SerialName("isSrednia")
|
@SerialName("isSrednia")
|
||||||
val isAverage: Boolean = false,
|
val isAverage: Boolean,
|
||||||
|
|
||||||
@SerialName("isPunkty")
|
@SerialName("isPunkty")
|
||||||
val isPoints: Boolean = false,
|
val isPoints: Boolean,
|
||||||
|
|
||||||
@SerialName("isDorosli")
|
@SerialName("isDorosli")
|
||||||
val isForAdults: Boolean = false,
|
val isForAdults: Boolean,
|
||||||
)
|
)
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
package io.github.wulkanowy.sdk.scrapper.interceptor
|
package io.github.wulkanowy.sdk.scrapper.interceptor
|
||||||
|
|
||||||
import io.github.wulkanowy.sdk.scrapper.ApiEndpointsResponseMapping
|
|
||||||
import io.github.wulkanowy.sdk.scrapper.ApiResponse
|
import io.github.wulkanowy.sdk.scrapper.ApiResponse
|
||||||
import io.github.wulkanowy.sdk.scrapper.CookieJarCabinet
|
import io.github.wulkanowy.sdk.scrapper.CookieJarCabinet
|
||||||
import io.github.wulkanowy.sdk.scrapper.Scrapper
|
|
||||||
import io.github.wulkanowy.sdk.scrapper.Scrapper.LoginType
|
import io.github.wulkanowy.sdk.scrapper.Scrapper.LoginType
|
||||||
import io.github.wulkanowy.sdk.scrapper.Scrapper.LoginType.ADFS
|
import io.github.wulkanowy.sdk.scrapper.Scrapper.LoginType.ADFS
|
||||||
import io.github.wulkanowy.sdk.scrapper.Scrapper.LoginType.ADFSCards
|
import io.github.wulkanowy.sdk.scrapper.Scrapper.LoginType.ADFSCards
|
||||||
|
@ -14,8 +12,6 @@ import io.github.wulkanowy.sdk.scrapper.Scrapper.LoginType.STANDARD
|
||||||
import io.github.wulkanowy.sdk.scrapper.exception.VulcanClientError
|
import io.github.wulkanowy.sdk.scrapper.exception.VulcanClientError
|
||||||
import io.github.wulkanowy.sdk.scrapper.exception.VulcanServerError
|
import io.github.wulkanowy.sdk.scrapper.exception.VulcanServerError
|
||||||
import io.github.wulkanowy.sdk.scrapper.getModuleHeadersFromDocument
|
import io.github.wulkanowy.sdk.scrapper.getModuleHeadersFromDocument
|
||||||
import io.github.wulkanowy.sdk.scrapper.getModuleHost
|
|
||||||
import io.github.wulkanowy.sdk.scrapper.getPathIndexByModuleHost
|
|
||||||
import io.github.wulkanowy.sdk.scrapper.getVHeaders
|
import io.github.wulkanowy.sdk.scrapper.getVHeaders
|
||||||
import io.github.wulkanowy.sdk.scrapper.isAnyMappingAvailable
|
import io.github.wulkanowy.sdk.scrapper.isAnyMappingAvailable
|
||||||
import io.github.wulkanowy.sdk.scrapper.login.LoginModuleResult
|
import io.github.wulkanowy.sdk.scrapper.login.LoginModuleResult
|
||||||
|
@ -30,11 +26,6 @@ import io.github.wulkanowy.sdk.scrapper.repository.AccountRepository.Companion.S
|
||||||
import io.github.wulkanowy.sdk.scrapper.repository.AccountRepository.Companion.SELECTOR_STANDARD
|
import io.github.wulkanowy.sdk.scrapper.repository.AccountRepository.Companion.SELECTOR_STANDARD
|
||||||
import kotlinx.coroutines.runBlocking
|
import kotlinx.coroutines.runBlocking
|
||||||
import kotlinx.serialization.json.Json
|
import kotlinx.serialization.json.Json
|
||||||
import kotlinx.serialization.json.JsonArray
|
|
||||||
import kotlinx.serialization.json.JsonElement
|
|
||||||
import kotlinx.serialization.json.JsonObject
|
|
||||||
import kotlinx.serialization.json.jsonArray
|
|
||||||
import kotlinx.serialization.json.jsonObject
|
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
import okhttp3.Interceptor
|
import okhttp3.Interceptor
|
||||||
import okhttp3.MediaType
|
import okhttp3.MediaType
|
||||||
|
@ -42,10 +33,8 @@ import okhttp3.Protocol
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import okhttp3.ResponseBody
|
import okhttp3.ResponseBody
|
||||||
import okhttp3.ResponseBody.Companion.toResponseBody
|
|
||||||
import okio.Buffer
|
import okio.Buffer
|
||||||
import okio.BufferedSource
|
import okio.BufferedSource
|
||||||
import okio.use
|
|
||||||
import org.jsoup.Jsoup
|
import org.jsoup.Jsoup
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.select.Elements
|
import org.jsoup.select.Elements
|
||||||
|
@ -83,7 +72,7 @@ internal class AutoLoginInterceptor(
|
||||||
val request = chain.request()
|
val request = chain.request()
|
||||||
checkRequest()
|
checkRequest()
|
||||||
val response = try {
|
val response = try {
|
||||||
performRequest(chain, request)
|
chain.proceed(request.attachModuleHeaders())
|
||||||
} catch (e: Throwable) {
|
} catch (e: Throwable) {
|
||||||
when (e) {
|
when (e) {
|
||||||
is VulcanClientError -> checkHttpErrorResponse(e, url)
|
is VulcanClientError -> checkHttpErrorResponse(e, url)
|
||||||
|
@ -91,6 +80,12 @@ internal class AutoLoginInterceptor(
|
||||||
}
|
}
|
||||||
throw e
|
throw e
|
||||||
}
|
}
|
||||||
|
if (response.body?.contentType()?.subtype != "json") {
|
||||||
|
val body = response.peekBody(Long.MAX_VALUE).byteStream()
|
||||||
|
val html = Jsoup.parse(body, null, url)
|
||||||
|
checkResponse(html, url, response)
|
||||||
|
saveModuleHeaders(html, uri)
|
||||||
|
}
|
||||||
response
|
response
|
||||||
} catch (e: NotLoggedInException) {
|
} catch (e: NotLoggedInException) {
|
||||||
if (loginLock.tryLock()) {
|
if (loginLock.tryLock()) {
|
||||||
|
@ -114,7 +109,7 @@ internal class AutoLoginInterceptor(
|
||||||
StudentModuleHost in uri.host -> student.getOrThrow()
|
StudentModuleHost in uri.host -> student.getOrThrow()
|
||||||
else -> logger.info("Resource don't need further login anyway")
|
else -> logger.info("Resource don't need further login anyway")
|
||||||
}
|
}
|
||||||
performRequest(chain, chain.request())
|
chain.proceed(chain.request().attachModuleHeaders())
|
||||||
} catch (e: IOException) {
|
} catch (e: IOException) {
|
||||||
logger.debug("IO Error occurred on login")
|
logger.debug("IO Error occurred on login")
|
||||||
throw e
|
throw e
|
||||||
|
@ -136,7 +131,7 @@ internal class AutoLoginInterceptor(
|
||||||
logger.debug("User logged in. Retry after login...")
|
logger.debug("User logged in. Retry after login...")
|
||||||
}
|
}
|
||||||
|
|
||||||
performRequest(chain, chain.request())
|
chain.proceed(chain.request().attachModuleHeaders())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -195,69 +190,6 @@ internal class AutoLoginInterceptor(
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun performRequest(chain: Interceptor.Chain, request: Request): Response {
|
|
||||||
val response = chain.proceed(request.attachModuleHeaders())
|
|
||||||
val url = request.url.toString()
|
|
||||||
val uri = request.url
|
|
||||||
|
|
||||||
return if (response.body?.contentType()?.subtype != "json") {
|
|
||||||
val body = response.peekBody(Long.MAX_VALUE).byteStream()
|
|
||||||
val html = Jsoup.parse(body, null, url)
|
|
||||||
checkResponse(html, url, response)
|
|
||||||
saveModuleHeaders(html, uri)
|
|
||||||
response
|
|
||||||
} else {
|
|
||||||
handleResponseMapping(response, uri)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun handleResponseMapping(response: Response, uri: HttpUrl): Response {
|
|
||||||
val moduleHost = getModuleHost(uri)
|
|
||||||
val pathSegmentIndex = getPathIndexByModuleHost(moduleHost)
|
|
||||||
val pathKey = uri.pathSegments.getOrNull(pathSegmentIndex)
|
|
||||||
|
|
||||||
val headers = headersByHost[moduleHost]
|
|
||||||
val mappings = Scrapper.responseMap[headers?.appVersion]?.get(moduleHost)
|
|
||||||
?: ApiEndpointsResponseMapping[headers?.appVersion]?.get(moduleHost)
|
|
||||||
if (mappings.isNullOrEmpty()) return response
|
|
||||||
|
|
||||||
val jsonMappings = mappings[pathKey] ?: mappings["__common__"]
|
|
||||||
|
|
||||||
return response.body?.byteStream()?.bufferedReader()?.use {
|
|
||||||
val contentType = response.body?.contentType()
|
|
||||||
val body = mapResponseContent(
|
|
||||||
response = Json.decodeFromString<JsonElement>(it.readText()),
|
|
||||||
jsonMappings = jsonMappings.orEmpty(),
|
|
||||||
).toString().toResponseBody(contentType)
|
|
||||||
response.newBuilder().body(body).build()
|
|
||||||
} ?: response
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun mapResponseContent(response: JsonElement, jsonMappings: Map<String, String>): JsonElement {
|
|
||||||
return when (response) {
|
|
||||||
is JsonArray -> JsonArray(
|
|
||||||
response.jsonArray.map {
|
|
||||||
when (it) {
|
|
||||||
is JsonArray -> it.jsonArray
|
|
||||||
is JsonObject -> mapJsonObjectKeys(it.jsonObject, jsonMappings)
|
|
||||||
else -> it
|
|
||||||
}
|
|
||||||
},
|
|
||||||
)
|
|
||||||
|
|
||||||
is JsonObject -> mapJsonObjectKeys(response.jsonObject, jsonMappings)
|
|
||||||
else -> response
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun mapJsonObjectKeys(jsonObject: JsonObject, jsonMappings: Map<String, String>): JsonObject {
|
|
||||||
return JsonObject(
|
|
||||||
jsonObject.map {
|
|
||||||
(jsonMappings[it.key] ?: it.key) to mapResponseContent(it.value, jsonMappings)
|
|
||||||
}.toMap(),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun checkRequest() {
|
private fun checkRequest() {
|
||||||
if (emptyCookieJarIntercept && !cookieJarCabinet.isUserCookiesExist()) {
|
if (emptyCookieJarIntercept && !cookieJarCabinet.isUserCookiesExist()) {
|
||||||
throw NotLoggedInException("No cookie found! You are not logged in yet")
|
throw NotLoggedInException("No cookie found! You are not logged in yet")
|
||||||
|
|
|
@ -62,7 +62,6 @@ public final class io/github/wulkanowy/sdk/Sdk {
|
||||||
public static synthetic fun getReceivedMessages$default (Lio/github/wulkanowy/sdk/Sdk;Ljava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
public static synthetic fun getReceivedMessages$default (Lio/github/wulkanowy/sdk/Sdk;Ljava/lang/String;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object;
|
||||||
public final fun getRecipients (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
public final fun getRecipients (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||||
public final fun getRegisteredDevices (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
public final fun getRegisteredDevices (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||||
public final fun getResponseMapping ()Ljava/util/Map;
|
|
||||||
public final fun getSchool (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
public final fun getSchool (Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
|
||||||
public final fun getSchoolSymbol ()Ljava/lang/String;
|
public final fun getSchoolSymbol ()Ljava/lang/String;
|
||||||
public final fun getSchoolYear ()I
|
public final fun getSchoolYear ()I
|
||||||
|
@ -117,7 +116,6 @@ public final class io/github/wulkanowy/sdk/Sdk {
|
||||||
public final fun setMode (Lio/github/wulkanowy/sdk/Sdk$Mode;)V
|
public final fun setMode (Lio/github/wulkanowy/sdk/Sdk$Mode;)V
|
||||||
public final fun setPassword (Ljava/lang/String;)V
|
public final fun setPassword (Ljava/lang/String;)V
|
||||||
public final fun setPrivatePem (Ljava/lang/String;)V
|
public final fun setPrivatePem (Ljava/lang/String;)V
|
||||||
public final fun setResponseMapping (Ljava/util/Map;)V
|
|
||||||
public final fun setSchoolSymbol (Ljava/lang/String;)V
|
public final fun setSchoolSymbol (Ljava/lang/String;)V
|
||||||
public final fun setSchoolYear (I)V
|
public final fun setSchoolYear (I)V
|
||||||
public final fun setScrapperBaseUrl (Ljava/lang/String;)V
|
public final fun setScrapperBaseUrl (Ljava/lang/String;)V
|
||||||
|
|
|
@ -254,12 +254,6 @@ class Sdk {
|
||||||
scrapper.vHeaders = value
|
scrapper.vHeaders = value
|
||||||
}
|
}
|
||||||
|
|
||||||
var responseMapping
|
|
||||||
get() = scrapper.responseMapping
|
|
||||||
set(value) {
|
|
||||||
scrapper.responseMapping = value
|
|
||||||
}
|
|
||||||
|
|
||||||
var vParamsEvaluation: suspend () -> EvaluateHandler
|
var vParamsEvaluation: suspend () -> EvaluateHandler
|
||||||
get() = scrapper.vParamsEvaluation
|
get() = scrapper.vParamsEvaluation
|
||||||
set(value) {
|
set(value) {
|
||||||
|
|
Loading…
Reference in a new issue