Exemplo n.º 1
0
        static void Main(string[] args)
        {
            FlightXML3 client = new FlightXML3();

            System.Net.ICredentials creds = new NetworkCredential("USERNAME", "APIKEY");
            client.Credentials = creds;

            AirportBoardsStruct res = client.AirportBoards("KIAH", false, true, "", "enroute", 10, true, 0, true);

            Console.WriteLine("Flights enroute to KIAH");

            Console.WriteLine(res);
            foreach (var flight in res.enroute.flights)
            {
                Console.WriteLine(String.Format("{0} ({1})\t{2} ({3})", flight.ident, flight.aircrafttype,
                                                flight.origin.airport_name, flight.origin.code));
            }
        }
        static void Main(string[] args)
        {
            FlightXML3SoapClient client = new FlightXML3SoapClient();

            client.ClientCredentials.UserName.UserName = "******";
            client.ClientCredentials.UserName.Password = "******";

            AirportBoardsRequest req = new AirportBoardsRequest();

            req.airport_code = "KIAH";

            AirportBoardsStruct res = client.AirportBoards("KIAH", false, "", "enroute", 10, 0);

            Console.WriteLine("Flights enroute to KIAH");

            foreach (var flight in res.enroute.flights)
            {
                Console.WriteLine(String.Format("{0} ({1})\t{2} ({3})", flight.ident, flight.aircrafttype,
                                                flight.origin.airport_name, flight.origin.code));
            }
        }