Gluky Requester

class GlukyRequester(host: String, userId: String? = null, userToken: String? = null, debugMode: Boolean = false) : EquinoxRequester

The GlukyRequester class is useful to communicate with the Gluky's backend

Author

N7ghtm4r3 - Tecknobit

Parameters

host

The host address where is running the backend

userId

The user identifier

userToken

The user token

debugMode

Whether the requester is still in development and who is developing needs the log of the requester's workflow, if it is enabled all the details of the requests sent and the errors occurred will be printed in the console

See also

Requester
EquinoxRequester

Constructors

Link copied to clipboard
constructor(host: String, userId: String? = null, userToken: String? = null, debugMode: Boolean = false)

Functions

Link copied to clipboard
fun attachInterceptorOnRequest(interceptor: () -> Unit)
Link copied to clipboard
open suspend fun changeEmail(newEmail: String): JsonObject
Link copied to clipboard
open override fun changeHost(host: String)
Link copied to clipboard
open suspend fun changeLanguage(newLanguage: String): JsonObject
Link copied to clipboard
open suspend fun changePassword(newPassword: String): JsonObject
Link copied to clipboard
open suspend fun changeProfilePic(profilePicName: String, profilePicBytes: ByteArray): JsonObject
Link copied to clipboard
open fun clearSession()
Link copied to clipboard
suspend fun createReport(period: GlycemicTrendPeriod, groupingDay: GlycemicTrendGroupingDay?, from: Long?, to: Long?): JsonObject

Request to create a report related to a glycemic trend with the specified parameters

Link copied to clipboard
open suspend fun deleteAccount(): JsonObject
Link copied to clipboard
suspend fun deleteReport(report: Report): JsonObject

Request to delete a report

Link copied to clipboard
suspend fun downloadReport(report: Report, onDownloadCompleted: (String?) -> Unit)

Request to download a created request

Link copied to clipboard
suspend fun fillBasalInsulin(targetDay: Long, glycemia: String, insulinUnits: Int): JsonObject

Request to fill a basal insulin record

Link copied to clipboard
suspend fun fillDay(targetDay: Long): JsonObject

Request to fill the specified targetDay

Link copied to clipboard
suspend fun fillMeal(targetDay: Long, mealType: MeasurementType, glycemia: String, postPrandialGlycemia: String, insulinUnits: Int, content: List<Pair<MutableState<String>, MutableState<String>>>): JsonObject

Request to fill a meal

Link copied to clipboard
suspend fun getDailyMeasurements(targetDay: Long): JsonObject

Request to get the daily measurement

Link copied to clipboard
suspend fun getDynamicAccountData(): JsonObject
Link copied to clipboard
suspend fun getGlycemicTrend(period: GlycemicTrendPeriod, groupingDay: GlycemicTrendGroupingDay?, from: Long?, to: Long?): JsonObject

Request to retrieve the glycemic trend with the specified parameters

Link copied to clipboard
suspend fun saveDailyNotes(targetDay: Long, content: String): JsonObject

Request to save the notes related to the target day

Link copied to clipboard
fun setUserCredentials(userId: String?, userToken: String?)
Link copied to clipboard
open suspend fun signIn(email: String, password: String, language: String, vararg custom: Any?): JsonObject
Link copied to clipboard
suspend fun signUp(serverSecret: String, name: String, surname: String, email: String, password: String, language: String, vararg custom: Any?): JsonObject