Last active
September 17, 2022 15:48
-
-
Save ibrahimsn98/f6732597bc27e597ea69700e324c8479 to your computer and use it in GitHub Desktop.
ty-demeter-blog-1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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