A Ruby interface to the Swrve AB Testing API.
gem install swrve
Once your account is set up at Swrve.com use the following to configure Swrve
Swrve.configure do |config|
config.api_key = YOUR_API_KEY
config.game_id = YOUR_GAME_ID
end
Swrve.session_start('user uuid')
Swrve.create_event('user uuid', "custom.event.name.that.occurred")
Swrve.purchase('user uuid', 'Item Id', 5)
...
...
Swrve.session_end('user uuid')
json_resource = Swrve.resource('user uuid', "ab_test_name")