cima_rs/endpoints/
changes.rs1use crate::api_client::CimaClient;
2use crate::models::ChangeRecord;
3use anyhow::{Context, Result};
4
5impl CimaClient {
6 pub async fn get_change_log(
14 &self,
15 date: &str,
16 registration_numbers: Option<&[&str]>,
17 ) -> Result<crate::models::PaginatedResponse<ChangeRecord>> {
18 let mut params = vec![("fecha", date.to_string())];
19
20 if let Some(regs) = registration_numbers {
21 for reg in regs {
22 params.push(("nregistro", reg.to_string()));
23 }
24 }
25
26 self.get_with_params("registroCambios", ¶ms)
27 .await
28 .context("Failed to get change log")
29 }
30}