예제 #1
0
        //private static string postCoderesponse;

        static void Main(string[] args)
        {
            List <Bus> tflBusArrivalResult  = new List <Bus>();
            List <Bus> tflBusArrivalResult2 = new List <Bus>();
            List <Bus> orderedResult        = new List <Bus>();
            List <Bus> orderedResult2       = new List <Bus>();

            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

            APIManager apiManager = new APIManager();

            Console.WriteLine("Please Enter a Post Code to see the arrivals for the nearest 2 bus stops");
            string postCode = Console.ReadLine();

            apiManager.GetLonAndLatByPostCode(postCode);
            tflBusArrivalResult  = apiManager.tflBusArrivalResult;
            tflBusArrivalResult2 = apiManager.tflBusArrivalResult2;
            orderedResult        = apiManager.orderedResult;
            orderedResult2       = apiManager.orderedResult2;
            ShowResults(tflBusArrivalResult, tflBusArrivalResult2, orderedResult, orderedResult2, apiManager);

            Console.ReadLine();
        }