Class: Lifen::Settings
- Inherits:
-
Object
- Object
- Lifen::Settings
- Defined in:
- lib/lifen/settings.rb
Instance Method Summary collapse
- #reload ⇒ Object (also: #refresh)
- #save ⇒ Object
Instance Method Details
#reload ⇒ Object 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 |
#save ⇒ Object
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 |