···103103 }
104104 }
105105106106- /// Logs in to the Strong backend using the provided username and password.
106106+ /// Logs in to the Strong backend using the provided username/e-mail and password.
107107 pub async fn login(
108108 &mut self,
109109 username: &str,
···163163 Ok(())
164164 }
165165166166+ /// Refreshes the access token using tokens passed as parameters.
166167 #[cfg(feature = "full")]
167168 pub async fn refresh_by_tokens(
168169 &mut self,
···192193 Ok(())
193194 }
194195196196+ /// Gets the user data for the currently logged-in user.
197197+ /// The `continuation` parameter is used to paginate the results.
198198+ /// The `limit` parameter specifies the number of results to return.
199199+ /// The `includes` parameter specifies which related entities to include in the response. See the `Includes` enum for possible values.
195200 pub async fn get_user(
196201 &self,
197202 continuation: &str,
···234239 Ok(parsed)
235240 }
236241242242+ /// Measurements are exercises that are available in the Strong app.
243243+ /// This function retrieves a list of measurements.
244244+ /// The `page` parameter is used to paginate the results.
245245+ /// Check the measurements.total and the length of measurements.embedded.measurements to determine if there are more pages.
237246 pub async fn get_measurements(
238247 &self,
239248 page: i8,
···276285 Ok(response)
277286 }
278287279279- pub async fn get_logs(&self) -> Result<(), Box<dyn std::error::Error>> {
288288+ pub async fn get_logs_raw(&self) -> Result<String, Box<dyn std::error::Error>> {
280289 let user_id = self.user_id.as_ref().ok_or("Missing user id")?;
281290 let url = self.url.join(&format!("api/logs/{user_id}"))?;
282291 let response = self
···288297 .await?;
289298 let response_text = response.text().await?;
290299291291- eprintln!("Logs response: {}", response_text);
292292- Ok(())
300300+ Ok(response_text)
293301 }
294302}