Ejemplo n.º 1
0
 public ApiExecuteResult <IEnumerable <Departed> > GetDeparted(HttpExecuteArg args)
 {
     return(ParseFindResult(
                () => _raw.GetDeparted(args),
                () => _empty.GetDeparted(args).Data,
                (dynamic json) => json.DepartedResult.departures
                ));
 }
Ejemplo n.º 2
0
 public ApiExecuteResult <IEnumerable <Enroute> > GetEnroute(HttpExecuteArg args)
 {
     return(ParseFindResult(
                () => _raw.GetEnroute(args),
                () => _empty.GetEnroute(args).Data,
                (dynamic json) => json.EnrouteResult.enroute
                ));
 }
Ejemplo n.º 3
0
 public ApiExecuteResult <IEnumerable <Scheduled> > GetScheduled(HttpExecuteArg args)
 {
     return(ParseFindResult(
                () => _raw.GetScheduled(args),
                () => _empty.GetScheduled(args).Data,
                (dynamic json) => json.ScheduledResult.scheduled
                ));
 }
Ejemplo n.º 4
0
 public ApiExecuteResult <AirlineInfo> AirlineInfo(HttpExecuteArg args)
 {
     return(ParseFindResult(
                () => _raw.GetAirlineInfo(args),
                () => _empty.AirlineInfo(args).Data,
                (dynamic json) => json.AirlineInfoResult
                ));
 }
Ejemplo n.º 5
0
 public ApiExecuteResult <IEnumerable <Arrived> > GetArrived(HttpExecuteArg args)
 {
     return(ParseFindResult(
                () => _raw.GetArrived(args),
                () => _empty.GetArrived(args).Data,
                (dynamic json) => json.ArrivedResult.arrivals
                ));
 }
Ejemplo n.º 6
0
 public ApiExecuteResult <IEnumerable <FlightInfoEx> > GetFlightInfoEx(HttpExecuteArg args)
 {
     return(ParseFindResult(
                () => _raw.GetFlightInfoEx(args),
                () => _empty.GetFlightInfoEx(args).Data,
                (dynamic json) => json.FlightInfoExResult.flights
                ));
 }
Ejemplo n.º 7
0
 public ApiExecuteResult <InFlightInfo> GetInFlightInfo(HttpExecuteArg args)
 {
     return(ParseFindResult(
                () => _raw.GetInFlightInfo(args),
                () => _empty.GetInFlightInfo(args).Data,
                (dynamic json) => json.InFlightInfoResult
                ));
 }
Ejemplo n.º 8
0
        public ApiExecuteResult <MapFlight> GetMapFlight(HttpExecuteArg args)
        {
            var result = _raw.GetMapFlight(args);

            if (result == null || result.Error != null)
            {
                return(new ApiExecuteResult <MapFlight>(_empty.GetMapFlight(args).Data, result != null ? result.Error : null));
            }
            dynamic dynamicResult = JsonConvert.DeserializeObject(result.Result, null, new UnixDateTimeConverter());

            if (dynamicResult.error != null)
            {
                return(new ApiExecuteResult <MapFlight>(_empty.GetMapFlight(args).Data, ParseFlightAwareError((string)dynamicResult.error)));
            }

            return(new ApiExecuteResult <MapFlight>(new MapFlight()
            {
                image = new Base64Image((string)dynamicResult.MapFlightResult)
            }, result.Error));
        }
Ejemplo n.º 9
0
        public ApiExecuteResult <GetFlightId> GetFlightID(HttpExecuteArg args)
        {
            var result = _raw.GetFlightID(args);

            if (result == null || result.Error != null)
            {
                return(new ApiExecuteResult <GetFlightId>(_empty.GetFlightID(args).Data, result != null ? result.Error : null));
            }
            dynamic dynamicResult = JsonConvert.DeserializeObject(result.Result, null, new UnixDateTimeConverter());

            if (dynamicResult.error != null)
            {
                return(new ApiExecuteResult <GetFlightId>(_empty.GetFlightID(args).Data, ParseFlightAwareError((string)dynamicResult.error)));
            }

            return(new ApiExecuteResult <GetFlightId>(new GetFlightId()
            {
                faFlightID = dynamicResult.GetFlightIDResult
            }, result.Error));
        }
Ejemplo n.º 10
0
 public ApiExecuteResult <GetFlightId> GetFlightID(HttpExecuteArg args)
 {
     return(new ApiExecuteResult <GetFlightId>(new GetFlightId()));
 }
Ejemplo n.º 11
0
 public ApiExecuteResult <IEnumerable <AirlineFlightSchedule> > AirlineFlightSchedule(HttpExecuteArg args)
 {
     return(ParseFindResult(
                () => _raw.GetAirlineFlightSchedule(args),
                () => _empty.AirlineFlightSchedule(args).Data,
                (dynamic json) => json.AirlineFlightSchedulesResult.data
                ));
 }
Ejemplo n.º 12
0
 public ApiExecuteResult <IEnumerable <GetHistoricalTrack> > GetHistoricalTrack(HttpExecuteArg args)
 {
     return(ParseFindResult(
                () => _raw.GetHistoricalTrack(args),
                () => _empty.GetHistoricalTrack(args).Data,
                (dynamic json) => json.GetHistoricalTrackResult.data
                ));
 }
Ejemplo n.º 13
0
 public ApiExecuteResult <IEnumerable <Scheduled> > GetScheduled(HttpExecuteArg args)
 {
     return(new ApiExecuteResult <IEnumerable <Scheduled> >(new [] { new Scheduled() }));
 }
Ejemplo n.º 14
0
 public ApiExecuteResult <MapFlight> GetMapFlight(HttpExecuteArg args)
 {
     return(new ApiExecuteResult <MapFlight>(new MapFlight()));
 }
Ejemplo n.º 15
0
 public ApiExecuteResult <IEnumerable <AirlineFlightSchedule> > AirlineFlightSchedule(HttpExecuteArg args)
 {
     return(new ApiExecuteResult <IEnumerable <AirlineFlightSchedule> >(new AirlineFlightSchedule[] { new AirlineFlightSchedule() }));
 }
Ejemplo n.º 16
0
 public ApiExecuteResult <IEnumerable <GetHistoricalTrack> > GetHistoricalTrack(HttpExecuteArg args)
 {
     return(new ApiExecuteResult <IEnumerable <GetHistoricalTrack> >(new[] { new GetHistoricalTrack() }));
 }
Ejemplo n.º 17
0
 public ApiExecuteResult <InFlightInfo> GetInFlightInfo(HttpExecuteArg args)
 {
     return(new ApiExecuteResult <InFlightInfo>(new InFlightInfo()));
 }
Ejemplo n.º 18
0
 public ApiExecuteResult <IEnumerable <Departed> > GetDeparted(HttpExecuteArg args)
 {
     return(new ApiExecuteResult <IEnumerable <Departed> >(new[] { new Departed() }));
 }
Ejemplo n.º 19
0
 public ApiExecuteResult <IEnumerable <Enroute> > GetEnroute(HttpExecuteArg args)
 {
     return(new ApiExecuteResult <IEnumerable <Enroute> >(new[] { new Enroute() }));
 }
Ejemplo n.º 20
0
 public ApiExecuteResult <IEnumerable <Arrived> > GetArrived(HttpExecuteArg args)
 {
     return(new ApiExecuteResult <IEnumerable <Arrived> >(new [] { new Arrived() }));
 }
Ejemplo n.º 21
0
 public ApiExecuteResult <AirportInfo> AirportInfo(HttpExecuteArg args)
 {
     return(new ApiExecuteResult <AirportInfo>(new AirportInfo()));
 }
Ejemplo n.º 22
0
 public ApiExecuteResult <IEnumerable <FlightInfoEx> > GetFlightInfoEx(HttpExecuteArg args)
 {
     return(new ApiExecuteResult <IEnumerable <FlightInfoEx> >(new FlightInfoEx[] { new FlightInfoEx() }));
 }