1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! # Fitbit-rs
//!
//! A Rust client for the Fitbit API that allows fetching sleep data and activity summaries.
//!
//! ## Features
//!
//! * Authentication using access tokens
//! * Fetch sleep data with detailed sleep stages and levels
//! * Fetch activity summaries including steps, calories, heart rate zones, etc.
//! * Response caching to minimize API calls
//!
//! ## Examples
//!
//! ```no_run
//! use fitbit_rs::{FitbitClient, FitbitClientTrait};
//! use chrono::NaiveDate;
//!
//! fn main() -> Result<(), fitbit_rs::FitbitError> {
//! // Get access token (typically from environment or config file)
//! let access_token = "your_access_token".to_string();
//!
//! // Create a client
//! let client = FitbitClient::new(access_token);
//!
//! // Fetch today's sleep data
//! let today = chrono::Local::now().date_naive();
//! let sleep_data = client.fetch_sleep_data(today)?;
//!
//! println!("Sleep duration: {} minutes", sleep_data.summary.total_minutes_asleep);
//!
//! Ok(())
//! }
//! ```
// Re-export the most commonly used types
pub use ;
pub use ActivitySummaryResponse;
pub use FitbitError;
pub use ;
pub use FitbitResponseCache;
pub use ;