1.0.3 • Published 1 year ago
shenkar-abtest-sdk v1.0.3
User Guide - SDK
Before
- All the function need to be async await functions
- Before callExperiment and declareGoal use get method to use experimentId for them.
Setup
- const ABTestSDK = require('shenkar-abtest')
- const ab = new ABTestSDK(accountId)
SDK Functions
getAllExperiments()
- ab.getAllExperiments()
- return an array of all experiments attached to the accountId
getABExperiments()
- ab.getABExperiments()
- return an array of all the AB experiments attached to the accountId
getFFExperiments()
- ab.getFFExperiments()
- return an array of all the Feature Flag experiments attached to the accountId
callExperiment(experiment_id)
- ab.callExperiment(experiment_id)
- return a random variant of the experiment
declareGoal(experiment_id, variant)
- ab.declareGoal(experiment_id, variant)
- increasing the variant success count