public (BusSystemData data, List <string> errors) LoadTransitData() { var connexionzPlatforms = ConnexionzClient.LoadPlatforms(); var connexionzRoutes = ConnexionzClient.LoadRoutes(); var googleData = GoogleTransitClient.LoadData(); var routes = CreateRoutes(googleData.Routes, connexionzRoutes); var stops = CreateStops(connexionzPlatforms, connexionzRoutes); var staticData = new BusStaticData( routes: routes.ToDictionary(r => r.RouteNo), stops: stops.ToDictionary(s => s.Id) ); var platformTagsLookup = connexionzPlatforms.ToDictionary(p => p.PlatformNo, p => p.PlatformTag); var schedule = CreateSchedule(googleData.Schedules, connexionzRoutes, connexionzPlatforms); var transitData = new BusSystemData( staticData, schedule, platformTagsLookup); var errors = ValidateTransitData(transitData); return(transitData, errors); }
public async Task <ConnexionzPlatformET?> GetEta(int platformTag) => await ConnexionzClient.GetPlatformEta(platformTag);