use serde::{self, Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug)]
pub struct Params {
#[serde(rename = "component")]
pub r#component: Option<String>,
#[serde(rename = "activityId")]
pub r#activity_id: Option<String>,
#[serde(rename = "agent")]
pub r#agent: Option<String>,
#[serde(rename = "registration")]
pub r#registration: Option<String>,
#[serde(rename = "since")]
pub r#since: Option<String>,
}
pub type r#Returns = Vec<String>;
pub async fn call<'a>(
client: &'a mut moodle_client::MoodleClient,
params: &'a mut Params,
) -> anyhow::Result<Returns> {
let json = client.post("core_xapi_get_states", params).await?;
serde_json::from_value(json).map_err(|e| e.into())
}
pub async fn call_raw<'a>(
client: &'a mut moodle_client::MoodleClient,
params: &'a mut Params,
) -> anyhow::Result<serde_json::Value> {
client.post("core_xapi_get_states", params).await
}