- Add Irregular Rhythm Notifications (IRN) endpoint support
- 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.
- BREAKING: Upgrade
oauth2
dependency to v2.0 - BREAKING: Minimum required Ruby version 2.7.0
- BREAKING: Make utility methods private (e.g.
format_date
) - Fix response parsing error for
revoke_token!
- Some internal cleanup
- Add ECG endpoint support
- Add Active Zone Minutes endpoint support
- Add Sleep Log by Date Range endpoint support
- Use strict encoding for auth tokens
- Reduce build size
- Improve gemspec metadata
- The following methods now take a subscription_id as the first argument:
- create_subscription
- delete_subscription
- Fix scope param handling for
auth_url
- Refactor configuration logic
- Improve endpoint request specs
- Format code with Rubocop
- Add documentation for more methods
- Add documentation for several methods
- Add support for the following endpoints:
- Breathing Rate
- Oxygen Saturation (SpO2)
- Cardio Score (VO2 Max)
- Heart Rate Variability
- Temperature (Core & Skin)
- Add support for token revocation via
revoke_token!
.
- Fix docs formatting
- Some docs improvements
- Expand endpont support for foods (searching foods, creating custom foods, updating/deleting logs).
- Expand endpoint support for water logging (create, update, delete water logs).
- Expand endpoint support for sleep (list sleep logs, create/delete sleep logs).
- Expand endpoint support for goals (food, sleep, water goals).
- Add endpoint support for meals.
- Allow
get
,post
, anddelete
methods to accept blocks. - Switch to Github Actions for CI.
- Rename a few methods for better accuracy/clarity:
- daily_goals -> daily_activity_goals
- weekly_goals -> weekly_activity_goals
- create_or_update_daily_goals -> update_daily_activity_goals
- create_or_update_weekly_goals -> update_weekly_activity_goals
- Add support for subscriptions endpoints.
- Make
get
andpost
methods more ergonomic (can pass params & body directly instead of via nested object). - Allow
delete
request method to specify query params. - Remove per-request response payload transformations (can be set per-client).
- Fix docs for examples
- Fix docs for listed options
- Add
auto_refresh_token
config to make token auto-refreshing configurable (defaults to true). - Add
on_token_refresh
config to specify callback to execute on token refresh (optional). - Bump
bundler
development dependency - Clean up documentation formatting
- Fix
sleep_time_series
endpoint - Tweak user-agent string in request headers
- Rework client to accept existing access tokens.
- Fix argument parsing in
FitbitAPI::Client
to respect fallback values passed to#configure
. - Add
byebug
as development dependency.
- Fix bug regarding optional
params
parsing for GET requests.
- Fix
#activity_logs_list
to allow passing in expected URL params.
- Post install cleanup
- Gem renamed from
fitbyte
tofitbit_api
- Make sure to change
Fitbyte::Client
toFitbitAPI::Client
in your code, no other changes should be necessary.
- Make sure to change
- Rename
#auth_page_link
to#auth_url
- Rename
snake_case
option tosnake_case_keys
- Code cleanup
- Add support for Activity and Heart Rate Intraday Time Series endpoints.
- Add support for weight and fat logging and deletion endpoints.
- Renamed
#weight_goals
and#body_fat_goals
to#weight_goal
and#body_fat_goal
.
- A
refresh_token
option can be passed in to retrieve an existing access token. - A configuration block can now be passed in to FitbitAPI, to allow for the setting of default instance attributes.
- File/code reorganization.
- Add Heart Rate endpoint support. Add support for Time Series endpoints.
- Minor improvements to some helper functions
- Users can now provide either snake_cased or camelCased param attribute keys when POSTing data to Fitbit. Keys are automatically converted to camelCase before a request is sent to Fitbit's API.
- Remove FitStruct objects
- The response's hash keys can now be transformed using the following options:
snake_case
- if set to true, all keys are formatted to snake_casesymbolize_keys
- if set to true, all keys are converted to symbols
- API endpoint support for the following actions:
- Add alarm
- Update alarm
- Delete alarm
- File reorganization
- Set minimum required Ruby version
- Minor testing tweaks for Travis CI
- Expand API endpoint support for the following actions:
- Add activity to favorites
- Retrieve list of activity log entries
- Create/update daily/weekly goals
- Delete activity
- Remove activity from favorites
-
Responses now return FitStruct objects (inherit from OpenStruct).
-
Ability to set default data return format by setting
raw_response
on FitbitAPI::Client instance (defaults to using FitStruct objects). Can be overridden on each API call by specifying theraw
boolean option.
- Default result format for
get
calls now return OpenStruct objects, allowing for more convenient method-like attribute access. Specifyingraw: true
returns original JSON.
- Remove
require 'json'
- MultiJson used for parsing JSON (with symbolized keys)
user_id
is interpolated into resource URLs, removing the hardcoded-
.
- API version in resource URLs is now user settable.
- Scope argument takes both String and Array types.
- Default init values moved to
defaults
hash.
- Initial auth logic setup for Client class.
- Endpoint support added for retrieving Food, Sleep, Water, Activities, Alarms, Body, Devices, Friends, and Users.