Module: Betavites

Defined in:
lib/betavites.rb,
lib/betavites/config.rb,
lib/betavites/remote.rb,
lib/betavites/railtie.rb,
lib/betavites/commands.rb

Defined Under Namespace

Classes: Commands, Config, Railtie, Remote

Constant Summary collapse

HOST =
"http://betavites.heroku.com"
VERSION =
1
CONFIG_PATH =
"config/betavites.yml"

Class Method Summary collapse

Class Method Details

.add_user(args) ⇒ Object



14
15
16
# File 'lib/betavites.rb', line 14

def add_user(args)
  code, message = Remote.send("api/add_user", args)
end

.invite_friend(email, inviter_id = nil) ⇒ Object



26
27
28
# File 'lib/betavites.rb', line 26

def invite_friend(email, inviter_id=nil)
  code, message = Remote.send("api/invite_friend", {:email => email, :inviter_id => inviter_id})
end

.redeem_code(code) ⇒ Object



22
23
24
# File 'lib/betavites.rb', line 22

def redeem_code(code)
  code, message = Remote.send("api/redeem_code", {:code => code})
end

.validate_code(code) ⇒ Object



18
19
20
# File 'lib/betavites.rb', line 18

def validate_code(code)
  code, message = Remote.send("api/validate_code", {:code => code})
end