Example #1
0
        private void StartProgram()
        {
            var apiCall     = new APIcall();
            var postCodeApi = new PostCodeAPI();

            Console.WriteLine("Please enter a postcode: ");
            var postcode = Console.ReadLine();
        }
Example #2
0
        public List <BusArrival> BusArrivalsFromPostcode(string postcode)
        {
            var postCodeApi = new PostCodeAPI();
            var apiCall     = new APIcall();
            var userLatLong = postCodeApi.GetLatLong(postcode);

            var busList     = apiCall.CallTflApi(userLatLong);
            var naptanIds   = apiCall.PrintStopPointId(busList);
            var busArrivals = apiCall.GetUpComingBuses(naptanIds);

            return(busArrivals);
        }