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

com.deque.networking.usageservice.UsageServiceClient.kt Maven / Gradle / Ivy

The newest version!
package com.deque.networking.usageservice

import com.deque.networking.models.DequeRetrofitBuilder

internal class UsageServiceClient(
    private val baseUrl: String
) {
    private val usageServiceInterface: UsageServiceInterface =
        DequeRetrofitBuilder(baseUrl).client(UsageServiceInterface::class.java)

    suspend fun sendEvent(event: UsageServiceEvent, userEmail: String): Result {
        return usageServiceInterface.sendEvent(
            UsageServiceEventV2Data(
                event = event.eventName,
                dateTime = System.currentTimeMillis(),
                distinctId = UsageService.distinctId,
                userId = userEmail,
                organization = UsageService.orgId,
            )
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy