unifly_api/session/
system_log.rs1use serde_json::Value;
7use tracing::debug;
8
9use crate::error::Error;
10use crate::session::client::SessionClient;
11
12impl SessionClient {
13 pub async fn get_client_roams(
20 &self,
21 mac: &str,
22 limit: Option<u32>,
23 ) -> Result<Vec<Value>, Error> {
24 let limit = limit.unwrap_or(200);
25 let path = format!(
26 "system-log/client-connection/{mac}?mac={mac}&separateConnectionSignalParam=false&limit={limit}"
27 );
28 let url = self.site_url_v2(&path);
29 debug!(mac, limit, "fetching client roam timeline");
30 let value = self.get_raw(url).await?;
31 Ok(match value {
32 Value::Array(items) => items,
33 other => vec![other],
34 })
35 }
36}