io.github.wulkanowy.sdk.scrapper.service.MessagesService.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk-scrapper Show documentation
Show all versions of sdk-scrapper Show documentation
Unified way of retrieving data from the UONET+ register through mobile api and scraping api
package io.github.wulkanowy.sdk.scrapper.service
import io.github.wulkanowy.sdk.scrapper.messages.Mailbox
import io.github.wulkanowy.sdk.scrapper.messages.MessageDetails
import io.github.wulkanowy.sdk.scrapper.messages.MessageMeta
import io.github.wulkanowy.sdk.scrapper.messages.MessageReplayDetails
import io.github.wulkanowy.sdk.scrapper.messages.Recipient
import io.github.wulkanowy.sdk.scrapper.messages.SendMessageRequest
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.PUT
import retrofit2.http.Query
import retrofit2.http.Url
internal interface MessagesService {
@GET("LoginEndpoint.aspx")
suspend fun getModuleStart(): String
@POST
@FormUrlEncoded
suspend fun sendModuleCertificate(
@Header("Referer") referer: String,
@Url url: String,
@FieldMap certificate: Map,
): String
@GET("api/Skrzynki")
suspend fun getMailboxes(): List
@GET("api/Pracownicy")
suspend fun getRecipients(
@Query("globalKeySkrzynka") mailboxKey: String,
): List
@GET("api/Odebrane")
suspend fun getReceived(
@Query("idLastWiadomosc") lastMessageKey: Int = 0,
@Query("pageSize") pageSize: Int = 50,
): List
@GET("api/OdebraneSkrzynka")
suspend fun getReceivedMailbox(
@Query("globalKeySkrzynka") mailboxKey: String,
@Query("idLastWiadomosc") lastMessageKey: Int = 0,
@Query("pageSize") pageSize: Int = 50,
): List
@GET("api/Wyslane")
suspend fun getSent(
@Query("idLastWiadomosc") lastMessageKey: Int = 0,
@Query("pageSize") pageSize: Int = 50,
): List
@GET("api/WyslaneSkrzynka")
suspend fun getSentMailbox(
@Query("globalKeySkrzynka") mailboxKey: String,
@Query("idLastWiadomosc") lastMessageKey: Int = 0,
@Query("pageSize") pageSize: Int = 50,
): List
@GET("api/Usuniete")
suspend fun getDeleted(
@Query("idLastWiadomosc") lastMessageKey: Int = 0,
@Query("pageSize") pageSize: Int = 50,
): List
@GET("api/UsunieteSkrzynka")
suspend fun getDeletedMailbox(
@Query("globalKeySkrzynka") mailboxKey: String,
@Query("idLastWiadomosc") lastMessageKey: Int = 0,
@Query("pageSize") pageSize: Int = 50,
): List
@GET("api/WiadomoscSzczegoly")
suspend fun getMessageDetails(@Query("apiGlobalKey") globalKey: String): MessageDetails?
@PUT("api/WiadomoscSzczegoly")
suspend fun markMessageAsRead(@Body body: Map)
@GET("api/WiadomoscOdpowiedzPrzekaz")
suspend fun getMessageReplayDetails(
@Query("apiGlobalKey") globalKey: String,
): MessageReplayDetails
@POST("api/WiadomoscNowa")
suspend fun sendMessage(
@Body body: SendMessageRequest,
)
@POST("api/MoveTrash")
suspend fun moveMessageToTrash(
@Body body: List,
)
@POST("api/RestoreTrash")
suspend fun restoreFromTrash(
@Body body: List,
)
@POST("api/Delete")
suspend fun deleteMessage(
@Body body: List,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy