Skip to content

Latest commit

 

History

History
executable file
·
115 lines (84 loc) · 4.01 KB

CHANGELOG.md

File metadata and controls

executable file
·
115 lines (84 loc) · 4.01 KB

[2.0.4] - 2024/01/24

Solves #19: Now, when using the method FitbitConnector.authorize, it is possible to specify a specific authorization scope (defined in https://dev.fitbit.com/build/reference/web-api/developer-guide/application-design/#Scopes) and token expiration time (defined in https://dev.fitbit.com/build/reference/web-api/authorization/authorize/). The new constructor is defined as:

static Future<FitbitCredentials?> authorize(
      {required String clientID,
      required String clientSecret,
      required String redirectUri,
      required String callbackUrlScheme,
      List<FitbitAuthScope> scopeList = const [FitbitAuthScope.ACTIVITY, FitbitAuthScope.CARDIO_FITNESS, FitbitAuthScope.HEART_RATE, FitbitAuthScope.LOCATION, FitbitAuthScope.NUTRITION, FitbitAuthScope.OXYGEN_SATURATION, FitbitAuthScope.PROFILE, FitbitAuthScope.RESPIRATORY_RATE, FitbitAuthScope.SETTINGS, FitbitAuthScope.SLEEP, FitbitAuthScope.SOCIAL, FitbitAuthScope.TEMPERATURE],
      int expiresIn = 28800  
        }) async {...}

Current available scopes are defined by the enumerator FitbitAuthScope:

enum FitbitAuthScope{
  ACTIVITY, // for `activity` scope
  CARDIO_FITNESS, // for `cardio_fitness` scope
  HEART_RATE, // for `heartrate` scope
  LOCATION, // for `location` scope
  NUTRITION, // for `nutrition` scope
  PROFILE, // for `profile` scope
  SETTINGS, // for `settings` scope
  SLEEP, // for `sleep` scope
  SOCIAL, // for `social` scope
  WEIGHT, // for `weight` scope
  OXYGEN_SATURATION, // for `oxygen_saturation` scope
  RESPIRATORY_RATE, // for `respiratory_rate` scope
  TEMPERATURE // for `temperature` scope
}

Available token expiration lifetimes are: 3600 (1 hour), 28800 (8 hours), 86400 (1 day), 604800 (1 week), 2592000 (30 days), or 31536000 (1 year).

Updates dependencies.

[2.0.3] - 2024/01/03

Updates dependencies.

[2.0.2] - 2023/06/30

Updates dependencies.

[2.0.1] - 2022/09/06

Fixed some typos.

[2.0.0] - 2022/09/06

Major release 2.0.0.

Breaking change:

Fitbit provided tokens are no longer managed by fitbitter. Now they are returned during the authorization process by the FitbitConnector.authorize() method:

FitbitCredentials? fitbitCredentials =
                    await FitbitConnector.authorize(
                        clientID: Strings.fitbitClientID,
                        clientSecret: Strings.fitbitClientSecret,
                        redirectUri: Strings.fitbitRedirectUri,
                        callbackUrlScheme: Strings.fitbitCallbackScheme);

As a consequence, to fetch data it is necessary to pass the credentials to each FitbitAPIURL constructor. For example:

See the docs for more info and examples.

New features:

  • Now it is possible to fetch breathing rate data (see FitbitBreathingRateData)
  • Now it is possible to fetch cardio score (VO2Max) data (see FitbitCardioScoreData)
  • Now it is possible to heart rate variability data (see FitbitHeartRateVariabilityData)
  • Now it is possible to fetch intraday Heart data (see FitbitHeartRateIntradayData)
  • Now it is possible to fetch SpO2 data (see FitbitSpO2Data)
  • Now it is possible to fetch intraday SpO2 data (see FitbitSpO2IntradayData)
  • Now it is possible to fetch skin temperature data (see FitbitTemperatureSkinData)

Minor changes:

  • FitbitHeartData is now FitbitHeartRateData
  • Removed WithUserId string from the name of APIURL related constructors
  • encodedId field in the Data classes is now called userID

[1.1.1] - 2022/02/25

Formatted according to flutter format ..

[1.0.0] - 2022/02/25

Release 1.0.0. Added docs at https://gcappon.github.com/fitbitter/ Updated dependencies.

[1.0.0-dev.5] - 2021/04/06

Now compatible with null safety.

[1.0.0-dev.4] - 2021/01/15

Formatted according to flutter format .. Added an example Flutter app.

[1.0.0-dev.3] - 2021/01/15

Upgraded dependencies. Deleted initialization deprecation of List. Provide full API docs.

[1.0.0-dev.2] - 2021/01/15

Fixed class exports.

[1.0.0-dev.1] - 2021/01/15

Just the first release.