Method: Activite::Client#sleep_summary
- Defined in:
- lib/activite/client.rb
#sleep_summary(user_id, options = {}) ⇒ Array<Activite::SleepSummary>
Get a summary of a user’s night. Includes the total time they slept, how long it took them to fall asleep, how long it took them to fall asleep, etc.
NOTE: user_id isn’t actually used in this API call (so I assume it is derived from the OAuth credentials) but I was uncomfortable introducing this inconsistency into this gem.
120 121 122 123 124 |
# File 'lib/activite/client.rb', line 120 def sleep_summary(user_id, = {}) perform_request(:get, '/v2/sleep', Activite::SleepSummary, 'series', { action: 'getsummary' }.merge()) end |