Skip to content

Releases: gcappon/fitbitter

Release 2.0.4

24 Jan 10:51
Compare
Choose a tag to compare

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.

Release 2.0.3

03 Jan 07:00
5ddafe7
Compare
Choose a tag to compare

Updated dependencies.

Release 2.0.2

30 Jun 07:55
Compare
Choose a tag to compare

Updated dependencies.

Release 2.0.1

07 Sep 09:59
Compare
Choose a tag to compare

Fixed some typos.

Release 2.0.0

06 Sep 15:55
Compare
Choose a tag to compare

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

Release 1.1.1

25 Feb 16:01
Compare
Choose a tag to compare
[master] release 1.1.1

Release 1.1.0

25 Feb 15:26
5c7165e
Compare
Choose a tag to compare
Update README.md

1.0.0

03 Jul 16:38
Compare
Choose a tag to compare
[master] renamed doc folder to docs.