Ejemplo n.º 1
0
        public BusSystemData 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);

            return(new BusSystemData(
                       staticData,
                       schedule,
                       platformTagsLookup));
        }
Ejemplo n.º 2
0
 public async Task <ConnexionzPlatformET> GetEta(int platformTag) => await ConnexionzClient.GetPlatformEta(platformTag);