Project

swrve

0.01
No commit activity in last 3 years
No release in over 3 years
Simple Client for Swrve API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

< 0.10, ~> 0.8
< 0.10, ~> 0.8
 Project Readme

The Swrve Ruby Gem

Coverage Status Build Status Code Climate Gem Version

A Ruby interface to the Swrve AB Testing API.

Installation

gem install swrve

Quick Start Guide

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

Events

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')

Resources

json_resource = Swrve.resource('user uuid', "ab_test_name")

Documentation

http://rdoc.info/gems/swrve