public class FlagsmithApiWrapper extends Object implements FlagsmithSdk
| Constructor and Description |
|---|
FlagsmithApiWrapper(FlagsmithCache cache,
FlagsmithConfig defaultConfig,
HashMap<String,String> customHeaders,
FlagsmithLogger logger,
String apiKey)
Instantiate with cache.
|
FlagsmithApiWrapper(FlagsmithConfig defaultConfig,
HashMap<String,String> customHeaders,
FlagsmithLogger logger,
String apiKey)
Instantiate with config, custom headers, logger and apikey.
|
| Modifier and Type | Method and Description |
|---|---|
FlagsmithCache |
getCache() |
FlagsmithConfig |
getConfig() |
EnvironmentModel |
getEnvironment() |
Flags |
getFeatureFlags(boolean doThrow)
Get Feature Flags from API.
|
FlagsmithLogger |
getLogger() |
Flags |
identifyUserWithTraits(String identifier,
List<TraitModel> traits,
boolean doThrow) |
okhttp3.Request |
newGetRequest(okhttp3.HttpUrl url)
Returns a build request with GET.
|
okhttp3.Request |
newPostRequest(okhttp3.HttpUrl url,
okhttp3.RequestBody body)
Returns a build request with POST.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitassertValidUser, getRequestorpublic FlagsmithApiWrapper(FlagsmithCache cache, FlagsmithConfig defaultConfig, HashMap<String,String> customHeaders, FlagsmithLogger logger, String apiKey)
cache - cache objectdefaultConfig - config objectcustomHeaders - custom headers listlogger - logger objectapiKey - api keypublic FlagsmithApiWrapper(FlagsmithConfig defaultConfig, HashMap<String,String> customHeaders, FlagsmithLogger logger, String apiKey)
defaultConfig - config objectcustomHeaders - custom headers listlogger - logger instanceapiKey - api keypublic Flags getFeatureFlags(boolean doThrow)
getFeatureFlags in interface FlagsmithSdkdoThrow - - whether throw exception or notpublic Flags identifyUserWithTraits(String identifier, List<TraitModel> traits, boolean doThrow)
identifyUserWithTraits in interface FlagsmithSdkpublic EnvironmentModel getEnvironment()
getEnvironment in interface FlagsmithSdkpublic FlagsmithConfig getConfig()
getConfig in interface FlagsmithSdkpublic FlagsmithCache getCache()
getCache in interface FlagsmithSdkpublic FlagsmithLogger getLogger()
public okhttp3.Request newGetRequest(okhttp3.HttpUrl url)
newGetRequest in interface FlagsmithSdkurl - - URL to invokepublic okhttp3.Request newPostRequest(okhttp3.HttpUrl url,
okhttp3.RequestBody body)
newPostRequest in interface FlagsmithSdkurl - - URL to invokebody - - body to postCopyright © 2022. All rights reserved.