use crate::api_url;
use crate::blocking::{build_req_with_skip, LTAClient};
use crate::models::train::prelude::*;
use crate::{Client, LTAResult, Train};
pub trait TrainRequests<C: Client> {
fn get_train_service_alert<S>(client: &C, skip: S) -> LTAResult<TrainServiceAlert>
where
S: Into<Option<u32>>;
}
impl TrainRequests<LTAClient> for Train {
fn get_train_service_alert<S>(client: <AClient, skip: S) -> LTAResult<TrainServiceAlert>
where
S: Into<Option<u32>>,
{
build_req_with_skip::<TrainServiceAlertResp, _, _>(
client,
api_url!("/TrainServiceAlerts"),
skip.into(),
)
}
}