Skip to content

Instantly share code, notes, and snippets.

@ibrahimsn98
Last active September 17, 2022 15:48
Show Gist options
  • Save ibrahimsn98/f6732597bc27e597ea69700e324c8479 to your computer and use it in GitHub Desktop.
Save ibrahimsn98/f6732597bc27e597ea69700e324c8479 to your computer and use it in GitHub Desktop.
ty-demeter-blog-1
class MealDemeterInterceptor @Inject constructor(
private val buildConfigProvider: BuildConfigProvider,
private val buildModelProvider: BuildModelProvider,
) : Demeter.Interceptor {
override suspend fun intercept(parameters: Parameters): Parameters {
val mutableParameters = parameters.toMutableMap()
mutableParameters["os_version"] = buildModelProvider.getBuildVersion()
mutableParameters["app_version"] = buildConfigProvider.getAppVersionName()
mutableParameters["domain"] = DOMAIN
mutableParameters["channel"] = CHANNEL
return mutableParameters
}
companion object {
private const val DOMAIN = "Core"
private const val CHANNEL = "Meal"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment