eagle_api/api/library/
history.rs1use crate::{EagleApi, EagleResponse, Result};
2
3impl EagleApi {
4 pub async fn library_history(&self) -> Result<Vec<String>> {
5 let url = format!("{}/api/library/history", self.inner.host);
6
7 let resp: EagleResponse<Vec<String>> =
8 self.inner.client.get(&url).send().await?.json().await?;
9
10 resp.ok()
11 }
12}
13
14#[cfg(test)]
15mod tests {
16 use super::*;
17
18 #[tokio::test]
19 async fn test_library_history() {
20 let api = EagleApi::new(&std::env::var("EAGLE_API_TEST_HOST").unwrap());
21 let resp = api.library_history().await;
22 resp.unwrap();
23 }
24}