Class: Lifen::Settings

Inherits:
Object
  • Object
show all
Defined in:
lib/lifen/settings.rb

Instance Method Summary collapse

Instance Method Details

#reloadObject Also known as: refresh



11
12
13
14
15
16
17
# File 'lib/lifen/settings.rb', line 11

def reload
  json = client.get("central/api/settings")

  load_from_json(json)

  self
end

#saveObject



21
22
23
24
25
26
27
28
29
# File 'lib/lifen/settings.rb', line 21

def save
  params = {"emailNotifications" => email_notifications, "pushNotifications" => push_notifications}

  json = client.post("central/api/settings", params)

  load_from_json(json)

  self
end