com.deque.networking.usageservice.UsageServiceClient.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of axe-devtools-android-analytics Show documentation
Show all versions of axe-devtools-android-analytics Show documentation
The Axe Devtools Android Analytics Library
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,
)
)
}
}