Skip to main content

cima_rs/endpoints/
materials.rs

1use crate::api_client::CimaClient;
2use crate::models::SafetyMaterial;
3use anyhow::{Context, Result};
4
5impl CimaClient {
6    /// Get informative materials associated with a medication
7    ///
8    /// Returns a single SafetyMaterial object (not an array)
9    pub async fn get_informative_materials(
10        &self,
11        registration_number: &str,
12    ) -> Result<SafetyMaterial> {
13        let params = vec![("nregistro", registration_number.to_string())];
14
15        self.get_with_params("materiales", &params)
16            .await
17            .context("Failed to get informative materials")
18    }
19}