Last active
November 2, 2018 23:51
-
-
Save jakebellacera/cf3a59e5d4b146b722358533bd6926f3 to your computer and use it in GitHub Desktop.
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
SplitClient split = SplitFactoryBuilder.build("YOUR_API_KEY").client(); | |
String treatment = split.getTreatment("USER_ID", "my-feature"); | |
if (treatment.equals("on")) { | |
// insert on code here | |
} else if (treatment.equals("off")) { | |
// insert off code here | |
} else { | |
// insert control code here | |
} |
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
split := client.NewSplitFactory("YOUR_API_KEY").Client() | |
treatment := client.Treatment("USER_ID", "my-feature") | |
if treatment == "on" { | |
// insert on code here | |
} else if treatment == "off" { | |
// insert off code here | |
} else { | |
// insert control code here | |
} |
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
let split = SplitFactory(apiKey: YOUR_API_KEY, key: user_id).client() | |
let treatment = split.getTreatment("my-feature") | |
if treatment == "on" { | |
// insert on code here | |
} else if treatment == "off" { | |
// insert off code here | |
} else { | |
// insert control code here | |
} |
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
SplitClient split = SplitFactoryBuilder.build("YOUR_API_KEY").client(); | |
String treatment = split.getTreatment("USER_ID", "my-feature"); | |
if (treatment.equals("on")) { | |
// insert on code here | |
} else if (treatment.equals("off")) { | |
// insert off code here | |
} else { | |
// insert control code here | |
} |
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
const clientConfig = { | |
core: { | |
authorizationKey: "YOUR_API_KEY", | |
key: "USER_ID" | |
} | |
}; | |
const split = splitio(clientConfig).client(); | |
split.on(split.Event.SDK_READY, () => { | |
const treatment = split.getTreatment("my-feature"); | |
if (treatment === "on") { | |
// insert on code here | |
} else if (treatment === "off") { | |
// insert off code here | |
} else { | |
// insert control code here | |
} | |
}); |
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
var factory = new SplitFactory("YOUR_API_KEY"); | |
var split = factory.Client(); | |
var treatment = split.GetTreatment("USER_ID", "my-feature"); | |
if (treatment == "on") { | |
// insert on code here | |
} else if (treatment == "off") { | |
// insert off code here | |
} else { | |
// insert control code here | |
} |
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
const clientConfig = { | |
core: { | |
authorizationKey: "YOUR_API_KEY", | |
key: "USER_ID" | |
} | |
}; | |
const split = splitio(clientConfig).client(); | |
split.on(split.Event.SDK_READY, () => { | |
const treatment = split.getTreatment("my-feature"); | |
if (treatment === "on") { | |
// insert on code here | |
} else if (treatment === "off") { | |
// insert off code here | |
} else { | |
// insert control code here | |
} | |
}); |
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
$split = \SplitIO\Sdk::factory('YOUR_API_KEY')->client(); | |
$treatment = $split->getTreatment('USER_ID', 'my-feature'); | |
if (treatment == 'on') { | |
// insert on code here | |
} else if (treatment == 'off') { | |
// insert off code here | |
} else { | |
// insert control code here | |
} |
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
from splitio import get_factory | |
split = get_factory('YOUR_API_KEY').client() | |
treatment = split.get_treatment('USER_ID', 'my-feature') | |
if treatment == "on": | |
# insert code here to show on treatment | |
elif treatment == "off": | |
# insert code here to show off treatment | |
else: | |
# insert your control treatment code here |
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
split = SplitIoClient::SplitFactory.new("YOUR_API_KEY").client | |
treatment = split.get_treatment("USER_ID", "my-feature") | |
if treatment == "on" | |
# insert on code here | |
elsif treatment == "off" | |
# insert off code here | |
else treatment | |
# insert control code here | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment