Module: Sense::Notifications

Included in:
Client
Defined in:
lib/hello_sense/notifications.rb

Instance Method Summary collapse

Instance Method Details

#create_notification(data) ⇒ Object



28
29
30
# File 'lib/hello_sense/notifications.rb', line 28

def create_notification(data)
  put('/v1/notifications', data)
end

#notificationsArray<Hash>

Examples:

[
  {
    "type" => "SLEEP_SCORE",
    "enabled" => true,
    "name" => Sleep Score"
  }, {
    "type" => "SYSTEM",
    "enabled" => true,
    "name" => System Alerts"
  }, {
    "type" => "SLEEP_REMINDER",
    "enabled" => true,
    "name" => Sleep Reminder"
  }
]


24
25
26
# File 'lib/hello_sense/notifications.rb', line 24

def notifications
  get('/v1/notifications')
end

#update_notifications(data) ⇒ Object



32
33
34
# File 'lib/hello_sense/notifications.rb', line 32

def update_notifications(data)
  post('/v1/notifications/registration', data)
end