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

io.github.wulkanowy.sdk.hebe.ApiRequest.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.hebe

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import java.time.ZoneId
import java.time.ZonedDateTime
import java.time.format.DateTimeFormatter.ofPattern
import java.util.UUID

@Serializable
internal data class ApiRequest(

    @SerialName("API")
    val apiVersion: Int = 1,

    @SerialName("AppName")
    val appName: String = "DzienniczekPlus 2.0",

    @SerialName("AppVersion")
    val appVersion: String = "22.09.02 (G)",

    @SerialName("CertificateId")
    val certificateId: String,

    @SerialName("Envelope")
    val envelope: T,

    @SerialName("FirebaseToken")
    val firebaseToken: String,

    @SerialName("RequestId")
    val requestId: String = UUID.randomUUID().toString(),

    @SerialName("Timestamp")
    val timestamp: Long = ZonedDateTime.now(ZoneId.of("GMT")).toInstant().toEpochMilli(),

    @SerialName("TimestampFormatted")
    val timestampFormatted: String = ZonedDateTime.now(ZoneId.of("GMT")).format(ofPattern("yyyy-MM-dd hh:mm:ss")),
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy