Exemplo n.º 1
0
 public ApiExecuteResult <IEnumerable <Departed> > GetDeparted(HttpExecuteArg args)
 {
     return(ParseFindResult(
                () => _raw.GetDeparted(args),
                () => _empty.GetDeparted(args).Data,
                (dynamic json) => json.DepartedResult.departures
                ));
 }
Exemplo n.º 2
0
 public ApiExecuteResult <IEnumerable <Enroute> > GetEnroute(HttpExecuteArg args)
 {
     return(ParseFindResult(
                () => _raw.GetEnroute(args),
                () => _empty.GetEnroute(args).Data,
                (dynamic json) => json.EnrouteResult.enroute
                ));
 }
Exemplo n.º 3
0
 public ApiExecuteResult <IEnumerable <Scheduled> > GetScheduled(HttpExecuteArg args)
 {
     return(ParseFindResult(
                () => _raw.GetScheduled(args),
                () => _empty.GetScheduled(args).Data,
                (dynamic json) => json.ScheduledResult.scheduled
                ));
 }
Exemplo n.º 4
0
 public ApiExecuteResult <AirlineInfo> AirlineInfo(HttpExecuteArg args)
 {
     return(ParseFindResult(
                () => _raw.GetAirlineInfo(args),
                () => _empty.AirlineInfo(args).Data,
                (dynamic json) => json.AirlineInfoResult
                ));
 }
Exemplo n.º 5
0
 public ApiExecuteResult <IEnumerable <Arrived> > GetArrived(HttpExecuteArg args)
 {
     return(ParseFindResult(
                () => _raw.GetArrived(args),
                () => _empty.GetArrived(args).Data,
                (dynamic json) => json.ArrivedResult.arrivals
                ));
 }
Exemplo n.º 6
0
 public ApiExecuteResult <IEnumerable <FlightInfoEx> > GetFlightInfoEx(HttpExecuteArg args)
 {
     return(ParseFindResult(
                () => _raw.GetFlightInfoEx(args),
                () => _empty.GetFlightInfoEx(args).Data,
                (dynamic json) => json.FlightInfoExResult.flights
                ));
 }
Exemplo n.º 7
0
 public ApiExecuteResult <InFlightInfo> GetInFlightInfo(HttpExecuteArg args)
 {
     return(ParseFindResult(
                () => _raw.GetInFlightInfo(args),
                () => _empty.GetInFlightInfo(args).Data,
                (dynamic json) => json.InFlightInfoResult
                ));
 }
Exemplo 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));
        }
Exemplo 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));
        }
Exemplo n.º 10
0
 public ApiExecuteResult <GetFlightId> GetFlightID(HttpExecuteArg args)
 {
     return(new ApiExecuteResult <GetFlightId>(new GetFlightId()));
 }
Exemplo n.º 11
0
 public ApiExecuteResult <IEnumerable <AirlineFlightSchedule> > AirlineFlightSchedule(HttpExecuteArg args)
 {
     return(ParseFindResult(
                () => _raw.GetAirlineFlightSchedule(args),
                () => _empty.AirlineFlightSchedule(args).Data,
                (dynamic json) => json.AirlineFlightSchedulesResult.data
                ));
 }
Exemplo n.º 12
0
 public ApiExecuteResult <IEnumerable <GetHistoricalTrack> > GetHistoricalTrack(HttpExecuteArg args)
 {
     return(ParseFindResult(
                () => _raw.GetHistoricalTrack(args),
                () => _empty.GetHistoricalTrack(args).Data,
                (dynamic json) => json.GetHistoricalTrackResult.data
                ));
 }
Exemplo n.º 13
0
 public ApiExecuteResult <IEnumerable <Scheduled> > GetScheduled(HttpExecuteArg args)
 {
     return(new ApiExecuteResult <IEnumerable <Scheduled> >(new [] { new Scheduled() }));
 }
Exemplo n.º 14
0
 public ApiExecuteResult <MapFlight> GetMapFlight(HttpExecuteArg args)
 {
     return(new ApiExecuteResult <MapFlight>(new MapFlight()));
 }
Exemplo n.º 15
0
 public ApiExecuteResult <IEnumerable <AirlineFlightSchedule> > AirlineFlightSchedule(HttpExecuteArg args)
 {
     return(new ApiExecuteResult <IEnumerable <AirlineFlightSchedule> >(new AirlineFlightSchedule[] { new AirlineFlightSchedule() }));
 }
Exemplo n.º 16
0
 public ApiExecuteResult <IEnumerable <GetHistoricalTrack> > GetHistoricalTrack(HttpExecuteArg args)
 {
     return(new ApiExecuteResult <IEnumerable <GetHistoricalTrack> >(new[] { new GetHistoricalTrack() }));
 }
Exemplo n.º 17
0
 public ApiExecuteResult <InFlightInfo> GetInFlightInfo(HttpExecuteArg args)
 {
     return(new ApiExecuteResult <InFlightInfo>(new InFlightInfo()));
 }
Exemplo n.º 18
0
 public ApiExecuteResult <IEnumerable <Departed> > GetDeparted(HttpExecuteArg args)
 {
     return(new ApiExecuteResult <IEnumerable <Departed> >(new[] { new Departed() }));
 }
Exemplo n.º 19
0
 public ApiExecuteResult <IEnumerable <Enroute> > GetEnroute(HttpExecuteArg args)
 {
     return(new ApiExecuteResult <IEnumerable <Enroute> >(new[] { new Enroute() }));
 }
Exemplo n.º 20
0
 public ApiExecuteResult <IEnumerable <Arrived> > GetArrived(HttpExecuteArg args)
 {
     return(new ApiExecuteResult <IEnumerable <Arrived> >(new [] { new Arrived() }));
 }
Exemplo n.º 21
0
 public ApiExecuteResult <AirportInfo> AirportInfo(HttpExecuteArg args)
 {
     return(new ApiExecuteResult <AirportInfo>(new AirportInfo()));
 }
Exemplo n.º 22
0
 public ApiExecuteResult <IEnumerable <FlightInfoEx> > GetFlightInfoEx(HttpExecuteArg args)
 {
     return(new ApiExecuteResult <IEnumerable <FlightInfoEx> >(new FlightInfoEx[] { new FlightInfoEx() }));
 }