Trait lta::blocking::crowd::CrowdRequests
source · pub trait CrowdRequests<C: Client + ClientExt> {
// Required methods
fn get_passenger_vol_by(
client: &C,
vol_type: VolType,
date: impl Into<Option<Date>>,
skip: impl Into<Option<u32>>
) -> LTAResult<Vec<String>>;
fn get_crowd_density_rt(
client: &C,
train_line: MrtLine
) -> LTAResult<Vec<StationCrowdLevel>>;
fn get_crowd_density_forecast(
client: &C,
train_line: MrtLine
) -> LTAResult<CrowdDensityForecast>;
}
Expand description
All APIs pertaining to transportation crowd
Required Methods§
sourcefn get_passenger_vol_by(
client: &C,
vol_type: VolType,
date: impl Into<Option<Date>>,
skip: impl Into<Option<u32>>
) -> LTAResult<Vec<String>>
fn get_passenger_vol_by( client: &C, vol_type: VolType, date: impl Into<Option<Date>>, skip: impl Into<Option<u32>> ) -> LTAResult<Vec<String>>
Creates a new client for every call Update freq: By 15th of every month, the passenger volume for previous month data will be generated
Note: Link will expire after 5mins!
sourcefn get_crowd_density_rt(
client: &C,
train_line: MrtLine
) -> LTAResult<Vec<StationCrowdLevel>>
fn get_crowd_density_rt( client: &C, train_line: MrtLine ) -> LTAResult<Vec<StationCrowdLevel>>
Returns real-time platform crowdedness level for the MRT/LRT stations of a particular train network line
Update freq: 10 minutes
sourcefn get_crowd_density_forecast(
client: &C,
train_line: MrtLine
) -> LTAResult<CrowdDensityForecast>
fn get_crowd_density_forecast( client: &C, train_line: MrtLine ) -> LTAResult<CrowdDensityForecast>
Returns forecasted platform crowdedness level for the MRT/LRT stations of a particular train network line at 30 minutes interval
Update freq: 24hours
Object Safety§
This trait is not object safe.