diff --git a/CHANGELOG.md b/CHANGELOG.md index d3c4906..2308302 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +1.0.1 +----- +- Remove unused values from default params for the following: + - activity_logs_list + - ecg_logs_list + - sleep_logs_list +- Fixes bad request errors for `activity_logs_list` endpoint. + 1.0.0 ----- - BREAKING: Upgrade `oauth2` dependency to v2.0 diff --git a/lib/fitbit_api/activities.rb b/lib/fitbit_api/activities.rb index 64e5cbf..23227a6 100644 --- a/lib/fitbit_api/activities.rb +++ b/lib/fitbit_api/activities.rb @@ -61,7 +61,7 @@ def all_activities # @option params :limit [Integer] The max of the number of entries returned (max: 20) def activity_logs_list(params = {}) - default_params = { before_date: Date.today, after_date: nil, sort: 'desc', limit: 20, offset: 0 } + default_params = { before_date: Date.today, sort: 'desc', limit: 20, offset: 0 } get("user/#{user_id}/activities/list.json", default_params.merge(params)) end diff --git a/lib/fitbit_api/electrocardiogram.rb b/lib/fitbit_api/electrocardiogram.rb index 8faf793..ad506e2 100644 --- a/lib/fitbit_api/electrocardiogram.rb +++ b/lib/fitbit_api/electrocardiogram.rb @@ -16,7 +16,7 @@ class Client # @option params :limit [Integer] The max of the number of entries returned (max: 10) def ecg_logs_list(params = {}) - default_params = { before_date: Date.today, after_date: nil, sort: 'desc', limit: 10, offset: 0 } + default_params = { before_date: Date.today, sort: 'desc', limit: 10, offset: 0 } get("user/#{user_id}/ecg/list.json", default_params.merge(params)) end end diff --git a/lib/fitbit_api/sleep.rb b/lib/fitbit_api/sleep.rb index d19cbd3..5984b68 100644 --- a/lib/fitbit_api/sleep.rb +++ b/lib/fitbit_api/sleep.rb @@ -50,7 +50,7 @@ def sleep_logs_by_date_range(opts = {}) # @option params :limit [Integer] The max of the number of entries returned (max: 100) def sleep_logs_list(params = {}) - default_params = { before_date: Date.today, after_date: nil, sort: 'desc', limit: 20, offset: 0 } + default_params = { before_date: Date.today, sort: 'desc', limit: 20, offset: 0 } get("user/#{user_id}/sleep/list.json", default_params.merge(params)) end diff --git a/lib/fitbit_api/version.rb b/lib/fitbit_api/version.rb index 0a5cfbb..f314b99 100644 --- a/lib/fitbit_api/version.rb +++ b/lib/fitbit_api/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module FitbitAPI - VERSION = '1.0.0' + VERSION = '1.0.1' end