Class: FlightXML2REST
- Inherits:
-
Object
- Object
- FlightXML2REST
- Defined in:
- lib/FlightXML2RESTDriver.rb
Constant Summary collapse
- DefaultEndpointUrl =
"http://flightxml.flightaware.com/json/FlightXML2/"
Instance Attribute Summary collapse
-
#apiKey ⇒ Object
Returns the value of attribute apiKey.
-
#endpoint_url ⇒ Object
Returns the value of attribute endpoint_url.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#AircraftType(aircraftTypeRequest) ⇒ Object
Methods.
- #AirlineFlightInfo(airlineFlightInfoRequest) ⇒ Object
- #AirlineFlightSchedules(airlineFlightSchedulesRequest) ⇒ Object
- #AirlineInfo(airlineInfoRequest) ⇒ Object
- #AirlineInsight(airlineInsightRequest) ⇒ Object
- #AirportInfo(airportInfoRequest) ⇒ Object
- #AllAirlines(allAirlinesRequest) ⇒ Object
- #AllAirports(allAirportsRequest) ⇒ Object
- #Arrived(arrivedRequest) ⇒ Object
- #BlockIdentCheck(blockIdentCheckRequest) ⇒ Object
- #CountAirportOperations(countAirportOperationsRequest) ⇒ Object
- #CountAllEnrouteAirlineOperations(countAllEnrouteAirlineOperationsRequest) ⇒ Object
- #DecodeFlightRoute(decodeFlightRouteRequest) ⇒ Object
- #DecodeRoute(decodeRouteRequest) ⇒ Object
- #DeleteAlert(deleteAlertRequest) ⇒ Object
- #Departed(departedRequest) ⇒ Object
- #Enroute(enrouteRequest) ⇒ Object
- #FleetArrived(fleetArrivedRequest) ⇒ Object
- #FleetScheduled(fleetScheduledRequest) ⇒ Object
- #FlightInfo(flightInfoRequest) ⇒ Object
- #FlightInfoEx(flightInfoExRequest) ⇒ Object
- #GetAlerts(getAlertsRequest) ⇒ Object
- #GetFlightID(getFlightIDRequest) ⇒ Object
- #GetHistoricalTrack(getHistoricalTrackRequest) ⇒ Object
- #GetLastTrack(getLastTrackRequest) ⇒ Object
- #InboundFlightInfo(inboundFlightInfoRequest) ⇒ Object
- #InFlightInfo(inFlightInfoRequest) ⇒ Object
-
#initialize(username, apiKey, endpoint_url = nil) ⇒ FlightXML2REST
constructor
A new instance of FlightXML2REST.
- #LatLongsToDistance(latLongsToDistanceRequest) ⇒ Object
- #LatLongsToHeading(latLongsToHeadingRequest) ⇒ Object
- #MapFlight(mapFlightRequest) ⇒ Object
- #MapFlightEx(mapFlightExRequest) ⇒ Object
- #Metar(metarRequest) ⇒ Object
- #MetarEx(metarExRequest) ⇒ Object
- #NTaf(nTafRequest) ⇒ Object
- #RegisterAlertEndpoint(registerAlertEndpointRequest) ⇒ Object
- #RoutesBetweenAirports(routesBetweenAirportsRequest) ⇒ Object
- #RoutesBetweenAirportsEx(routesBetweenAirportsExRequest) ⇒ Object
- #Scheduled(scheduledRequest) ⇒ Object
- #Search(searchRequest) ⇒ Object
- #SearchBirdseyeInFlight(searchBirdseyeInFlightRequest) ⇒ Object
- #SearchBirdseyePositions(searchBirdseyePositionsRequest) ⇒ Object
- #SearchCount(searchCountRequest) ⇒ Object
- #SetAlert(setAlertRequest) ⇒ Object
- #SetMaximumResultSize(setMaximumResultSizeRequest) ⇒ Object
- #Taf(tafRequest) ⇒ Object
- #TailOwner(tailOwnerRequest) ⇒ Object
- #ZipcodeInfo(zipcodeInfoRequest) ⇒ Object
Constructor Details
#initialize(username, apiKey, endpoint_url = nil) ⇒ FlightXML2REST
Returns a new instance of FlightXML2REST.
9 10 11 12 |
# File 'lib/FlightXML2RESTDriver.rb', line 9 def initialize(username, apiKey, endpoint_url = nil) endpoint_url ||= DefaultEndpointUrl $api = RestClient::Resource.new(endpoint_url, username, apiKey) end |
Instance Attribute Details
#apiKey ⇒ Object
Returns the value of attribute apiKey.
7 8 9 |
# File 'lib/FlightXML2RESTDriver.rb', line 7 def apiKey @apiKey end |
#endpoint_url ⇒ Object
Returns the value of attribute endpoint_url.
7 8 9 |
# File 'lib/FlightXML2RESTDriver.rb', line 7 def endpoint_url @endpoint_url end |
#username ⇒ Object
Returns the value of attribute username.
7 8 9 |
# File 'lib/FlightXML2RESTDriver.rb', line 7 def username @username end |
Instance Method Details
#AircraftType(aircraftTypeRequest) ⇒ Object
Methods
15 16 17 |
# File 'lib/FlightXML2RESTDriver.rb', line 15 def AircraftType(aircraftTypeRequest) @aircraftTypeResult = AircraftTypeResults.new($api['AircraftType'].post aircraftTypeRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#AirlineFlightInfo(airlineFlightInfoRequest) ⇒ Object
19 20 21 |
# File 'lib/FlightXML2RESTDriver.rb', line 19 def AirlineFlightInfo(airlineFlightInfoRequest) @airlineFlightInfoResult = AirlineFlightInfoResults.new($api['AirlineFlightInfo'].post airlineFlightInfoRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#AirlineFlightSchedules(airlineFlightSchedulesRequest) ⇒ Object
23 24 25 |
# File 'lib/FlightXML2RESTDriver.rb', line 23 def AirlineFlightSchedules(airlineFlightSchedulesRequest) @airlineFlightSchedulesResult = AirlineFlightSchedulesResults.new($api['AirlineFlightSchedules'].post airlineFlightSchedulesRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#AirlineInfo(airlineInfoRequest) ⇒ Object
27 28 29 |
# File 'lib/FlightXML2RESTDriver.rb', line 27 def AirlineInfo(airlineInfoRequest) @airlineInfoResult = AirlineInfoResults.new($api['AirlineInfo'].post airlineInfoRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#AirlineInsight(airlineInsightRequest) ⇒ Object
31 32 33 |
# File 'lib/FlightXML2RESTDriver.rb', line 31 def AirlineInsight(airlineInsightRequest) @airlineInsightResult = AirlineInsightResults.new($api['AirlineInsight'].post airlineInsightRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#AirportInfo(airportInfoRequest) ⇒ Object
35 36 37 |
# File 'lib/FlightXML2RESTDriver.rb', line 35 def AirportInfo(airportInfoRequest) @airportInfoResult = AirportInfoResults.new($api['AirportInfo'].post airportInfoRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#AllAirlines(allAirlinesRequest) ⇒ Object
39 40 41 |
# File 'lib/FlightXML2RESTDriver.rb', line 39 def AllAirlines(allAirlinesRequest) @allAirlinesResult = AllAirlinesResults.new($api['AllAirlines'].post allAirlinesRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#AllAirports(allAirportsRequest) ⇒ Object
43 44 45 |
# File 'lib/FlightXML2RESTDriver.rb', line 43 def AllAirports(allAirportsRequest) @allAirportsResult = AllAirportsResults.new($api['AllAirports'].post allAirportsRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#Arrived(arrivedRequest) ⇒ Object
47 48 49 |
# File 'lib/FlightXML2RESTDriver.rb', line 47 def Arrived(arrivedRequest) @arrivedResult = ArrivedResults.new($api['Arrived'].post arrivedRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#BlockIdentCheck(blockIdentCheckRequest) ⇒ Object
51 52 53 |
# File 'lib/FlightXML2RESTDriver.rb', line 51 def BlockIdentCheck(blockIdentCheckRequest) @blockIdentCheckResult = BlockIdentCheckResults.new($api['BlockIdentCheck'].post blockIdentCheckRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#CountAirportOperations(countAirportOperationsRequest) ⇒ Object
55 56 57 |
# File 'lib/FlightXML2RESTDriver.rb', line 55 def CountAirportOperations(countAirportOperationsRequest) @countAirportOperationsResult = CountAirportOperationsResults.new($api['CountAirportOperations'].post countAirportOperationsRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#CountAllEnrouteAirlineOperations(countAllEnrouteAirlineOperationsRequest) ⇒ Object
59 60 61 |
# File 'lib/FlightXML2RESTDriver.rb', line 59 def CountAllEnrouteAirlineOperations(countAllEnrouteAirlineOperationsRequest) @countAllEnrouteAirlineOperationsResult = CountAllEnrouteAirlineOperationsResults.new($api['CountAllEnrouteAirlineOperations'].post countAllEnrouteAirlineOperationsRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#DecodeFlightRoute(decodeFlightRouteRequest) ⇒ Object
63 64 65 |
# File 'lib/FlightXML2RESTDriver.rb', line 63 def DecodeFlightRoute(decodeFlightRouteRequest) @decodeFlightRouteResult = DecodeFlightRouteResults.new($api['DecodeFlightRoute'].post decodeFlightRouteRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#DecodeRoute(decodeRouteRequest) ⇒ Object
67 68 69 |
# File 'lib/FlightXML2RESTDriver.rb', line 67 def DecodeRoute(decodeRouteRequest) @decodeRouteResult = DecodeRouteResults.new($api['DecodeRoute'].post decodeRouteRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#DeleteAlert(deleteAlertRequest) ⇒ Object
71 72 73 |
# File 'lib/FlightXML2RESTDriver.rb', line 71 def DeleteAlert(deleteAlertRequest) @deleteAlertResult = DeleteAlertResults.new($api['DeleteAlert'].post deleteAlertRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#Departed(departedRequest) ⇒ Object
75 76 77 |
# File 'lib/FlightXML2RESTDriver.rb', line 75 def Departed(departedRequest) @departedResult = DepartedResults.new($api['Departed'].post departedRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#Enroute(enrouteRequest) ⇒ Object
79 80 81 |
# File 'lib/FlightXML2RESTDriver.rb', line 79 def Enroute(enrouteRequest) @enrouteResult = EnrouteResults.new($api['Enroute'].post enrouteRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#FleetArrived(fleetArrivedRequest) ⇒ Object
83 84 85 |
# File 'lib/FlightXML2RESTDriver.rb', line 83 def FleetArrived(fleetArrivedRequest) @fleetArrivedResult = FleetArrivedResults.new($api['FleetArrived'].post fleetArrivedRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#FleetScheduled(fleetScheduledRequest) ⇒ Object
87 88 89 |
# File 'lib/FlightXML2RESTDriver.rb', line 87 def FleetScheduled(fleetScheduledRequest) @fleetScheduledResult = FleetScheduledResults.new($api['FleetScheduled'].post fleetScheduledRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#FlightInfo(flightInfoRequest) ⇒ Object
91 92 93 |
# File 'lib/FlightXML2RESTDriver.rb', line 91 def FlightInfo(flightInfoRequest) @flightInfoResult = FlightInfoResults.new($api['FlightInfo'].post flightInfoRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#FlightInfoEx(flightInfoExRequest) ⇒ Object
95 96 97 |
# File 'lib/FlightXML2RESTDriver.rb', line 95 def FlightInfoEx(flightInfoExRequest) @flightInfoExResult = FlightInfoExResults.new($api['FlightInfoEx'].post flightInfoExRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#GetAlerts(getAlertsRequest) ⇒ Object
99 100 101 |
# File 'lib/FlightXML2RESTDriver.rb', line 99 def GetAlerts(getAlertsRequest) @getAlertsResult = GetAlertsResults.new($api['GetAlerts'].post getAlertsRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#GetFlightID(getFlightIDRequest) ⇒ Object
103 104 105 |
# File 'lib/FlightXML2RESTDriver.rb', line 103 def GetFlightID(getFlightIDRequest) @getFlightIDResult = GetFlightIDResults.new($api['GetFlightID'].post getFlightIDRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#GetHistoricalTrack(getHistoricalTrackRequest) ⇒ Object
107 108 109 |
# File 'lib/FlightXML2RESTDriver.rb', line 107 def GetHistoricalTrack(getHistoricalTrackRequest) @getHistoricalTrackResult = GetHistoricalTrackResults.new($api['GetHistoricalTrack'].post getHistoricalTrackRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#GetLastTrack(getLastTrackRequest) ⇒ Object
111 112 113 |
# File 'lib/FlightXML2RESTDriver.rb', line 111 def GetLastTrack(getLastTrackRequest) @getLastTrackResult = GetLastTrackResults.new($api['GetLastTrack'].post getLastTrackRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#InboundFlightInfo(inboundFlightInfoRequest) ⇒ Object
115 116 117 |
# File 'lib/FlightXML2RESTDriver.rb', line 115 def InboundFlightInfo(inboundFlightInfoRequest) @inboundFlightInfoResult = InboundFlightInfoResults.new($api['InboundFlightInfo'].post inboundFlightInfoRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#InFlightInfo(inFlightInfoRequest) ⇒ Object
119 120 121 |
# File 'lib/FlightXML2RESTDriver.rb', line 119 def InFlightInfo(inFlightInfoRequest) @inFlightInfoResult = InFlightInfoResults.new($api['InFlightInfo'].post inFlightInfoRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#LatLongsToDistance(latLongsToDistanceRequest) ⇒ Object
123 124 125 |
# File 'lib/FlightXML2RESTDriver.rb', line 123 def LatLongsToDistance(latLongsToDistanceRequest) @latLongsToDistanceResult = LatLongsToDistanceResults.new($api['LatLongsToDistance'].post latLongsToDistanceRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#LatLongsToHeading(latLongsToHeadingRequest) ⇒ Object
127 128 129 |
# File 'lib/FlightXML2RESTDriver.rb', line 127 def LatLongsToHeading(latLongsToHeadingRequest) @latLongsToHeadingResult = LatLongsToHeadingResults.new($api['LatLongsToHeading'].post latLongsToHeadingRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#MapFlight(mapFlightRequest) ⇒ Object
131 132 133 |
# File 'lib/FlightXML2RESTDriver.rb', line 131 def MapFlight(mapFlightRequest) @mapFlightResult = MapFlightResults.new($api['MapFlight'].post mapFlightRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#MapFlightEx(mapFlightExRequest) ⇒ Object
135 136 137 |
# File 'lib/FlightXML2RESTDriver.rb', line 135 def MapFlightEx(mapFlightExRequest) @mapFlightExResult = MapFlightExResults.new($api['MapFlightEx'].post mapFlightExRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#Metar(metarRequest) ⇒ Object
139 140 141 |
# File 'lib/FlightXML2RESTDriver.rb', line 139 def Metar() @metarResult = MetarResults.new($api['Metar'].post .post, :content_type => "application/x-www-form-urlencoded") end |
#MetarEx(metarExRequest) ⇒ Object
143 144 145 |
# File 'lib/FlightXML2RESTDriver.rb', line 143 def MetarEx() @metarExResult = MetarExResults.new($api['MetarEx'].post .post, :content_type => "application/x-www-form-urlencoded") end |
#NTaf(nTafRequest) ⇒ Object
147 148 149 |
# File 'lib/FlightXML2RESTDriver.rb', line 147 def NTaf(nTafRequest) @nTafResult = NTafResults.new($api['NTaf'].post nTafRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#RegisterAlertEndpoint(registerAlertEndpointRequest) ⇒ Object
151 152 153 |
# File 'lib/FlightXML2RESTDriver.rb', line 151 def RegisterAlertEndpoint(registerAlertEndpointRequest) @registerAlertEndpointResult = RegisterAlertEndpointResults.new($api['RegisterAlertEndpoint'].post registerAlertEndpointRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#RoutesBetweenAirports(routesBetweenAirportsRequest) ⇒ Object
155 156 157 |
# File 'lib/FlightXML2RESTDriver.rb', line 155 def RoutesBetweenAirports(routesBetweenAirportsRequest) @routesBetweenAirportsResult = RoutesBetweenAirportsResults.new($api['RoutesBetweenAirports'].post routesBetweenAirportsRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#RoutesBetweenAirportsEx(routesBetweenAirportsExRequest) ⇒ Object
159 160 161 |
# File 'lib/FlightXML2RESTDriver.rb', line 159 def RoutesBetweenAirportsEx(routesBetweenAirportsExRequest) @routesBetweenAirportsExResult = RoutesBetweenAirportsExResults.new($api['RoutesBetweenAirportsEx'].post routesBetweenAirportsExRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#Scheduled(scheduledRequest) ⇒ Object
163 164 165 |
# File 'lib/FlightXML2RESTDriver.rb', line 163 def Scheduled(scheduledRequest) @scheduledResult = ScheduledResults.new($api['Scheduled'].post scheduledRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#Search(searchRequest) ⇒ Object
167 168 169 |
# File 'lib/FlightXML2RESTDriver.rb', line 167 def Search(searchRequest) @searchResult = SearchResults.new($api['Search'].post searchRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#SearchBirdseyeInFlight(searchBirdseyeInFlightRequest) ⇒ Object
171 172 173 |
# File 'lib/FlightXML2RESTDriver.rb', line 171 def SearchBirdseyeInFlight(searchBirdseyeInFlightRequest) @searchBirdseyeInFlightResult = SearchBirdseyeInFlightResults.new($api['SearchBirdseyeInFlight'].post searchBirdseyeInFlightRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#SearchBirdseyePositions(searchBirdseyePositionsRequest) ⇒ Object
175 176 177 |
# File 'lib/FlightXML2RESTDriver.rb', line 175 def SearchBirdseyePositions(searchBirdseyePositionsRequest) @searchBirdseyePositionsResult = SearchBirdseyePositionsResults.new($api['SearchBirdseyePositions'].post searchBirdseyePositionsRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#SearchCount(searchCountRequest) ⇒ Object
179 180 181 |
# File 'lib/FlightXML2RESTDriver.rb', line 179 def SearchCount(searchCountRequest) @searchCountResult = SearchCountResults.new($api['SearchCount'].post searchCountRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#SetAlert(setAlertRequest) ⇒ Object
183 184 185 |
# File 'lib/FlightXML2RESTDriver.rb', line 183 def SetAlert(setAlertRequest) @setAlertResult = SetAlertResults.new($api['SetAlert'].post setAlertRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#SetMaximumResultSize(setMaximumResultSizeRequest) ⇒ Object
187 188 189 |
# File 'lib/FlightXML2RESTDriver.rb', line 187 def SetMaximumResultSize(setMaximumResultSizeRequest) @setMaximumResultSizeResult = SetMaximumResultSizeResults.new($api['SetMaximumResultSize'].post setMaximumResultSizeRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#Taf(tafRequest) ⇒ Object
191 192 193 |
# File 'lib/FlightXML2RESTDriver.rb', line 191 def Taf(tafRequest) @tafResult = TafResults.new($api['Taf'].post tafRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#TailOwner(tailOwnerRequest) ⇒ Object
195 196 197 |
# File 'lib/FlightXML2RESTDriver.rb', line 195 def TailOwner(tailOwnerRequest) @tailOwnerResult = TailOwnerResults.new($api['TailOwner'].post tailOwnerRequest.post, :content_type => "application/x-www-form-urlencoded") end |
#ZipcodeInfo(zipcodeInfoRequest) ⇒ Object
199 200 201 |
# File 'lib/FlightXML2RESTDriver.rb', line 199 def ZipcodeInfo(zipcodeInfoRequest) @zipcodeInfoResult = ZipcodeInfoResults.new($api['ZipcodeInfo'].post zipcodeInfoRequest.post, :content_type => "application/x-www-form-urlencoded") end |