-
- All Implemented Interfaces:
-
com.appstack.attribution.NetworkClient
public final class RetrofitClient implements NetworkClient
Retrofit-powered implementation of NetworkClient.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classRetrofitClient.Companion
-
Constructor Summary
Constructors Constructor Description RetrofitClient(String baseUrl, String apiKey)CRITICAL WORKAROUND FOR REFLECTION-BASED INSTANTIATIONThe core SDK module uses reflection to dynamically load this RetrofitClient class:
GOTCHA: When using reflection to find constructors by parameter count, we need an explicit constructor that matches exactly what we're looking for.val cls = Class.forName("com.appstack.attribution.network.RetrofitClient") val ctor = cls.constructors.firstOrNull { it.parameterTypes.size == 2 } ctor.newInstance(config.endpointBaseUrl, config.apiKey)RetrofitClient(String baseUrl, String apiKey, OkHttpClient okHttpClient)
-
Method Summary
Modifier and Type Method Description UnitpostEvents(EventsBatchPayload payload)RemoteConfigfetchRemoteConfig()Retrieve the latest remote configuration for this API key. -
-
Constructor Detail
-
RetrofitClient
RetrofitClient(String baseUrl, String apiKey)
CRITICAL WORKAROUND FOR REFLECTION-BASED INSTANTIATIONThe core SDK module uses reflection to dynamically load this RetrofitClient class:
GOTCHA: When using reflection to find constructors by parameter count, we need an explicit constructor that matches exactly what we're looking for.val cls = Class.forName("com.appstack.attribution.network.RetrofitClient") val ctor = cls.constructors.firstOrNull { it.parameterTypes.size == 2 } ctor.newInstance(config.endpointBaseUrl, config.apiKey)
-
-
Method Detail
-
postEvents
Unit postEvents(EventsBatchPayload payload)
-
fetchRemoteConfig
RemoteConfig fetchRemoteConfig()
Retrieve the latest remote configuration for this API key.
-
-
-
-