All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.wulkanowy.sdk.scrapper.service.StudentService.kt Maven / Gradle / Ivy

Go to download

Unified way of retrieving data from the UONET+ register through mobile api and scraping api

There is a newer version: 2.7.0
Show newest version
package io.github.wulkanowy.sdk.scrapper.service

import io.github.wulkanowy.sdk.scrapper.ApiResponse
import io.github.wulkanowy.sdk.scrapper.attendance.AttendanceExcuseRequest
import io.github.wulkanowy.sdk.scrapper.attendance.AttendanceRecordDay
import io.github.wulkanowy.sdk.scrapper.attendance.AttendanceRecordsRequest
import io.github.wulkanowy.sdk.scrapper.attendance.AttendanceRequest
import io.github.wulkanowy.sdk.scrapper.attendance.AttendanceResponse
import io.github.wulkanowy.sdk.scrapper.attendance.AttendanceSummaryRequest
import io.github.wulkanowy.sdk.scrapper.attendance.AttendanceSummaryResponse
import io.github.wulkanowy.sdk.scrapper.attendance.Subject
import io.github.wulkanowy.sdk.scrapper.conferences.Conference
import io.github.wulkanowy.sdk.scrapper.exams.ExamRequest
import io.github.wulkanowy.sdk.scrapper.exams.ExamResponse
import io.github.wulkanowy.sdk.scrapper.grades.GradePointsSummaryResponse
import io.github.wulkanowy.sdk.scrapper.grades.GradeRequest
import io.github.wulkanowy.sdk.scrapper.grades.GradesResponse
import io.github.wulkanowy.sdk.scrapper.grades.GradesStatisticsPartial
import io.github.wulkanowy.sdk.scrapper.grades.GradesStatisticsRequest
import io.github.wulkanowy.sdk.scrapper.grades.GradesStatisticsSemester
import io.github.wulkanowy.sdk.scrapper.homework.HomeworkDay
import io.github.wulkanowy.sdk.scrapper.homework.HomeworkRequest
import io.github.wulkanowy.sdk.scrapper.menu.Menu
import io.github.wulkanowy.sdk.scrapper.menu.MenuRequest
import io.github.wulkanowy.sdk.scrapper.mobile.Device
import io.github.wulkanowy.sdk.scrapper.mobile.TokenResponse
import io.github.wulkanowy.sdk.scrapper.mobile.UnregisterDeviceRequest
import io.github.wulkanowy.sdk.scrapper.notes.NotesResponse
import io.github.wulkanowy.sdk.scrapper.register.AuthorizePermissionRequest
import io.github.wulkanowy.sdk.scrapper.register.AuthorizePermissionResponse
import io.github.wulkanowy.sdk.scrapper.register.Diary
import io.github.wulkanowy.sdk.scrapper.school.SchoolAndTeachersResponse
import io.github.wulkanowy.sdk.scrapper.student.StudentInfo
import io.github.wulkanowy.sdk.scrapper.student.StudentPhoto
import io.github.wulkanowy.sdk.scrapper.timetable.CacheResponse
import io.github.wulkanowy.sdk.scrapper.timetable.CompletedLesson
import io.github.wulkanowy.sdk.scrapper.timetable.CompletedLessonsRequest
import io.github.wulkanowy.sdk.scrapper.timetable.TimetableRequest
import io.github.wulkanowy.sdk.scrapper.timetable.TimetableResponse
import retrofit2.http.Body
import retrofit2.http.FieldMap
import retrofit2.http.FormUrlEncoded
import retrofit2.http.GET
import retrofit2.http.Header
import retrofit2.http.POST
import retrofit2.http.Url

internal interface StudentService {

    @GET
    suspend fun getStart(@Url url: String): String

    @GET("LoginEndpoint.aspx")
    suspend fun getModuleStart(): String

    @POST
    @FormUrlEncoded
    suspend fun sendModuleCertificate(
        @Header("Referer") referer: String,
        @Url url: String,
        @FieldMap certificate: Map,
    ): String

    @POST
    suspend fun getUserCache(
        @Url url: String,
        @Header("X-V-RequestVerificationToken") token: String,
        @Header("X-V-AppGuid") appGuid: String,
        @Header("X-V-AppVersion") appVersion: String,
        @Body body: Any = Any(),
    ): ApiResponse

    @POST("UczenCache.mvc/Get")
    suspend fun getUserCache(
        @Body body: Any = Any(),
    ): ApiResponse

    @POST("Autoryzacja.mvc/Post")
    suspend fun authorizePermission(
        @Body body: AuthorizePermissionRequest,
    ): ApiResponse

    @POST
    suspend fun getSchoolInfo(@Url url: String, @Body body: Any = Any()): ApiResponse>

    @POST("UczenDziennik.mvc/Get")
    suspend fun getDiaries(
        @Body body: Any = Any(),
    ): ApiResponse>

    @POST("Oceny.mvc/Get")
    suspend fun getGrades(
        @Body gradeRequest: GradeRequest,
    ): ApiResponse

    @POST("Statystyki.mvc/GetOcenyCzastkowe")
    suspend fun getGradesPartialStatistics(
        @Body gradesStatisticsRequest: GradesStatisticsRequest,
    ): ApiResponse>

    @POST("Statystyki.mvc/GetPunkty")
    suspend fun getGradesPointsStatistics(
        @Body gradesStatisticsRequest: GradesStatisticsRequest,
    ): ApiResponse

    @POST("Statystyki.mvc/GetOcenyRoczne")
    suspend fun getGradesAnnualStatistics(
        @Body gradesStatisticsRequest: GradesStatisticsRequest,
    ): ApiResponse>

    @POST("Frekwencja.mvc/Get")
    suspend fun getAttendance(
        @Body attendanceRequest: AttendanceRequest,
    ): ApiResponse

    @POST("FrekwencjaStatystyki.mvc/Get")
    suspend fun getAttendanceStatistics(
        @Body attendanceSummaryRequest: AttendanceSummaryRequest,
    ): ApiResponse

    @POST("FrekwencjaStatystykiPrzedmioty.mvc/Get")
    suspend fun getAttendanceSubjects(
        @Body body: Any = Any(),
    ): ApiResponse>

    @POST("EwidencjaObecnosci.mvc/Get")
    suspend fun getAttendanceRecords(
        @Body attendanceRecordsRequest: AttendanceRecordsRequest,
    ): ApiResponse>

    @POST("Usprawiedliwienia.mvc/Post")
    suspend fun excuseForAbsence(
        @Body attendanceExcuseRequest: AttendanceExcuseRequest,
    ): ApiResponse>

    @POST("EgzaminyZewnetrzne.mvc/Get")
    suspend fun getExternalExaminations()

    @POST("Sprawdziany.mvc/Get")
    suspend fun getExams(
        @Body examRequest: ExamRequest,
    ): ApiResponse>

    @POST("Homework.mvc/Get")
    suspend fun getHomework(
        @Body homeworkRequest: HomeworkRequest,
    ): ApiResponse>

    @POST("PlanZajec.mvc/Get")
    suspend fun getTimetable(
        @Body timetableRequest: TimetableRequest,
    ): ApiResponse

    @POST("LekcjeZrealizowane.mvc/GetPrzedmioty")
    suspend fun getRealizedSubjects(
        @Body body: Any = Any(),
    )

    @POST("LekcjeZrealizowane.mvc/GetZrealizowane")
    suspend fun getCompletedLessons(
        @Body completedLessonsRequest: CompletedLessonsRequest,
    ): ApiResponse>>

    @POST("UwagiIOsiagniecia.mvc/Get")
    suspend fun getNotes(
        @Body body: Any = Any(),
    ): ApiResponse

    @POST("Zebrania.mvc/Get")
    suspend fun getConferences(): ApiResponse>

    @POST("Jadlospis.mvc/Get")
    suspend fun getMenu(
        @Body menuRequest: MenuRequest,
    ): ApiResponse>

    @POST("ZarejestrowaneUrzadzenia.mvc/Get")
    suspend fun getRegisteredDevices(
        @Body body: Any = Any(),
    ): ApiResponse>

    @POST("ZarejestrowaneUrzadzenia.mvc/Get")
    suspend fun getToken(
        @Body body: Any = Any(),
    ): ApiResponse

    @POST("ZarejestrowaneUrzadzenia.mvc/Delete")
    suspend fun unregisterDevice(
        @Body unregisterDeviceRequest: UnregisterDeviceRequest,
    ): ApiResponse

    @POST("SzkolaINauczyciele.mvc/Get")
    suspend fun getSchoolAndTeachers(
        @Body body: Any = Any(),
    ): ApiResponse

    @POST("Uczen.mvc/Get")
    suspend fun getStudentInfo(): ApiResponse

    @POST("UczenZdjecie.mvc/Get")
    suspend fun getStudentPhoto(): ApiResponse
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy