Exemplo n.º 1
0
        public List <DaysDto> GetRouteDaysList(int routeId)
        {
            var req  = RequestUriFactory.GetRouteDaysListUri(routeId);
            var resp = HttpGetRequest(req);

            try
            {
                return((List <DaysDto>)JsonConvert.DeserializeObject(resp.Result, typeof(List <DaysDto>)));
            }
            catch (Exception)
            {
                return(null);
            }
        }
Exemplo n.º 2
0
        public List <SeasonDto> GetCommonSeasonsList()
        {
            var req  = RequestUriFactory.GetCommonSeasonsListUri();
            var resp = HttpGetRequest(req);

            try
            {
                return((List <SeasonDto>)JsonConvert.DeserializeObject(resp.Result, typeof(List <SeasonDto>)));
            }
            catch (Exception)
            {
                return(null);
            }
        }
Exemplo n.º 3
0
        public List <RouteDto> GetRoutesList(VehicleType vehicleType)
        {
            var req  = RequestUriFactory.GetRoutesListUri(vehicleType);
            var resp = HttpGetRequest(req);

            try
            {
                return((List <RouteDto>)JsonConvert.DeserializeObject(resp.Result, typeof(List <RouteDto>)));
            }
            catch (Exception)
            {
                return(null);
            }
        }
Exemplo n.º 4
0
        public ValidityTimeDto GetValidityTime(DaysOfOperation day, Direction direction, int routeId, Season season, VehicleType vehicleType)
        {
            var req  = RequestUriFactory.GetValidityTimeUri(day, direction, routeId, season, vehicleType);
            var resp = HttpGetRequest(req);

            try
            {
                return((ValidityTimeDto)JsonConvert.DeserializeObject(resp.Result, typeof(ValidityTimeDto)));
            }
            catch (Exception)
            {
                return(null);
            }
        }
Exemplo n.º 5
0
        public StopDto GetStopInfo(int stopId)
        {
            var req  = RequestUriFactory.GetStopInfoUri(stopId);
            var resp = HttpGetRequest(req);

            try
            {
                return((StopDto)JsonConvert.DeserializeObject(resp.Result, typeof(StopDto)));
            }
            catch (Exception)
            {
                return(null);
            }
        }
Exemplo n.º 6
0
        public List <StopDto> GetStops(DaysOfOperation day, Direction direction, int routeId, Season season, VehicleType vehicleType)
        {
            var req  = RequestUriFactory.GetStopsUri(day, direction, routeId, season, vehicleType);
            var resp = HttpGetRequest(req);

            try
            {
                return((List <StopDto>)JsonConvert.DeserializeObject(resp.Result, typeof(List <StopDto>)));
            }
            catch (Exception)
            {
                return(null);
            }
        }
Exemplo n.º 7
0
        public List <DirectionDto> GetDirections(DaysOfOperation day, int routeId)
        {
            var req  = RequestUriFactory.GetDirectionsUri(day, routeId);
            var resp = HttpGetRequest(req);

            try
            {
                return((List <DirectionDto>)JsonConvert.DeserializeObject(resp.Result, typeof(List <DirectionDto>)));
            }
            catch (Exception)
            {
                return(null);
            }
        }
Exemplo n.º 8
0
        public SeasonDto GetRouteCurrentSeason(int routeId)
        {
            var req  = RequestUriFactory.GetRouteCurrentSeasonUri(routeId);
            var resp = HttpGetRequest(req);

            try
            {
                return((SeasonDto)JsonConvert.DeserializeObject(resp.Result, typeof(SeasonDto)));
            }
            catch (Exception)
            {
                return(null);
            }
        }