FlightXML2RESTDriver 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0f7e3ab6c1ab07c2aee07ba0ccb62917ff4964c1
4
+ data.tar.gz: 0ee2674693312c997193375c9251a5b47294b4a3
5
+ SHA512:
6
+ metadata.gz: 3f026f053a70fbd26ef52af2b56a091f2fda8ddb652084f6a8d01c1ae80f1652b41563fdd580b676d6af0b952222d194e2a9c55cd15a3a1258eb66dee236d2e3
7
+ data.tar.gz: 9f475b3090abdcb87c3546351eb0307c4d49d40db8bfb669dc21a57946f516bb9d61a750386852f9240d12cd93554cab5383f810934b3f837b71c2a74eb7283f
@@ -0,0 +1,205 @@
1
+ require './FlightXML2RESTDriver.rb'
2
+ require './FlightXML2Rest.rb'
3
+
4
+ username = 'YourUserName'
5
+ apiKey = 'YourAPIKey'
6
+
7
+ #This provides the basis for all future calls to the API
8
+ test = FlightXML2REST.new(username, apiKey)
9
+
10
+ #AircraftType
11
+ result = test.AircraftType(AircraftTypeRequest.new('GALX'))
12
+ pp result.aircraftTypeResult
13
+
14
+ #AirlineFlightInfo
15
+ result = test.AirlineFlightInfo(AirlineFlightInfoRequest.new("SKW6400-1379568664-airline-0376"))
16
+ pp result.airlineFlightInfoResult
17
+
18
+ #AirlineFlightSchedules
19
+ result = test.AirlineFlightSchedules(AirlineFlightSchedulesRequest.new('UA', 'SFO', 1380153600, nil, 15, 0, 'EUG', 1380067200))
20
+ pp result.airlineFlightScheduleResult
21
+
22
+ #AirlineInfo
23
+ result = test.AirlineInfo(AirlineInfoRequest.new('COA'))
24
+ pp result.airlineInfoResult
25
+
26
+ #AirlineInsight
27
+ result = test.AirlineInsight(AirlineInsightRequest.new('SFO', 'EUG', 2))
28
+ pp result.airlineInsightResult
29
+
30
+ #AirportInfo
31
+ result = test.AirportInfo(AirportInfoRequest.new('KSFO'))
32
+ pp result.airportInfoResult
33
+
34
+ #AllAirlines
35
+ result = test.AllAirlines(AllAirlinesRequest.new())
36
+ pp result.allAirlinesResult
37
+
38
+ #AllAirports
39
+ result = test.AllAirports(AllAirportsRequest.new())
40
+ pp result.allAirportsResult
41
+
42
+ #Arrived
43
+ result = test.Arrived(ArrivedRequest.new('KSFO', 15, "airline", 0))
44
+ pp result.arrivedResult
45
+
46
+ #BlockIdentCheck
47
+ result = test.BlockIdentCheck(BlockIdentCheckRequest.new('N644AA'))
48
+ pp result.blockIdentCheckResult
49
+
50
+ #CountAirportOperations
51
+ result = test.CountAirportOperations(CountAirportOperationsRequest.new('KSFO'))
52
+ pp result.countAirportOperationsResult
53
+
54
+ #CountEnrouteAirlineOperations
55
+ result = test.CountAllEnrouteAirlineOperations(CountAllEnrouteAirlineOperationsRequest.new())
56
+ pp result.countAllEnrouteAirlineOperationsResult
57
+
58
+ #DecodeFlightRoute
59
+ result = test.DecodeFlightRoute(DecodeFlightRouteRequest.new(faFlightID))
60
+ pp result.decodeFlightRouteResult
61
+
62
+ #DecodeRoute
63
+ result = test.DecodeRoute(DecodeRouteRequest.new('KSFO','KEUG','RBG GOLDN6'))
64
+ pp result.decodeRouteResult
65
+
66
+ #DeleteAlert
67
+ result = test.DeleteAlert(DeleteAlertRequest.new(1))
68
+ pp result.deleteAlertResult
69
+
70
+ #Departed
71
+ result = test.Departed(DepartedRequest.new('KSFO', 'ga', 15, 0 ))
72
+ pp result.departedResult
73
+
74
+ #Enroute
75
+ result = test.Enroute(EnrouteRequest.new('KSFO', 'ga', 15, 0 ))
76
+ pp result.enrouteResult
77
+
78
+ #FleetArrived
79
+ result = test.FleetArrived(FleetArrivedRequest.new('SKW', 15, 0))
80
+ pp result.fleetArrivedResult
81
+
82
+ #FleetScheduled
83
+ result = test.FleetScheduled(FleetScheduledRequest.new('SKW', 15, 0))
84
+ pp result.fleetScheduledResult
85
+
86
+ #FlightInfo
87
+ result = test.FlightInfo(FlightInfoRequest.new(15, 'SKW6400'))
88
+ pp result.flightInfoResult
89
+
90
+ #FlightInfoEx
91
+ result = test.FlightInfoEx(FlightInfoExRequest.new(15, 'SKW6400', 0))
92
+ pp result.flightInfoExResult
93
+
94
+ #GetAlerts
95
+ result = test.GetAlerts(GetAlertsRequest.new())
96
+ pp result.getAlertsResult
97
+
98
+ #GetFlightID
99
+ result = test.GetFlightID(GetFlightIDRequest.new(1379123880, 'SKW5300'))
100
+ pp result.getFlightIDResult
101
+
102
+ #GetHistoricalTrack
103
+ result = test.GetHistoricalTrack(GetHistoricalTrackRequest.new("SKW6400-1379568664-airline-0376"))
104
+ pp result.getHistoricalTrackResult
105
+
106
+ #GetLastTrack
107
+ result = test.GetLastTrack(GetLastTrackRequest.new("SWA5300"))
108
+ pp result.getLastTrackResult
109
+
110
+ #InboundFlightInfo
111
+ result = test.InboundFlightInfo(InboundFlightInfoRequest.new(faFlightID))
112
+ pp result.inboundFlightInfoResult
113
+
114
+ #InFlightInfo
115
+ result = test.InFlightInfo(InFlightInfoRequest.new("ASA244"))
116
+ pp result.inFlightInfoResult
117
+
118
+ #LatLongsToDistance
119
+ result = test.LatLongsToDistance(LatLongsToDistanceRequest.new(45.583333333333336, 45.56666666666667, -122.58333333333333, -122.46666666666667))
120
+ pp result.latLongsToDistanceResult
121
+
122
+ #LatLongsToHeading
123
+ result = test.LatLongsToHeading(LatLongsToHeadingRequest.new(45.583333333333336, 45.56666666666667, -122.58333333333333, -122.46666666666667))
124
+ pp result.latLongsToHeadingResult
125
+
126
+ #MapFlight
127
+ #TODO Tested, but received blank image
128
+ result = test.MapFlight(MapFlightRequest.new("UAL991", 200, 400))
129
+ pp result.mapFlightResult
130
+
131
+ #MapFlightEx
132
+ #TODO Tested, but received blank image
133
+ result = test.MapFlightEx(MapFlightExRequest.new(0, "SKW6400-1379568664-airline-0376", [0,0,45,45], ["US state boundaries"], ["US urban areas", "US Cities"], 480, 640, 1, 1))
134
+ pp result.mapFlightExResult
135
+
136
+ #Metar
137
+ result = test.Metar(MetarRequest.new('KSFO'))
138
+ pp result.metarResult
139
+
140
+ #MetarEx
141
+ result = test.MetarEx(MetarExRequest.new('KSFO', 0, 15, 0))
142
+ pp result.metarExResult
143
+
144
+ #NTaf
145
+ result = test.NTaf(NTafRequest.new('KSFO'))
146
+ pp result.nTafResult
147
+
148
+ #RegisterAlertEndpoint
149
+ result = test.RegisterAlertEndpoint(RegisterAlertEndpointRequest.new("http://www.acme.net/push"))
150
+ pp result.registerAlertEndpointResult
151
+
152
+ #RoutesBetweenAirports
153
+ result = test.RoutesBetweenAirports(RoutesBetweenAirportsRequest.new('KSFO', 'KEUG'))
154
+ pp result.routesBetweenAirportsResult
155
+
156
+ #RoutesBetweenAirportsEx
157
+ result = test.RoutesBetweenAirportsEx(RoutesBetweenAirportsExRequest.new('KSFO', 15, '3 days', '6 days' ,0 , 'KEUG'))
158
+ pp result.routesBetweenAirportsExResult
159
+
160
+ #Scheduled
161
+ result = test.Scheduled(ScheduledRequest.new('KSFO', 15, "airline", 0))
162
+ pp result.scheduledResult
163
+
164
+ #Search
165
+ result = test.Search(SearchRequest.new(15, 0, '-type B77*'))
166
+ pp result.searchResult
167
+
168
+ #SearchBirdseyeInFlight
169
+ result = test.SearchBirdseyeInFlight(SearchBirdseyeInFlightRequest.new(15, 0, '{match aircraftType B77*}'))
170
+ pp result.searchBirdseyeInFlightResult
171
+
172
+ #SearchBirdseyePositions
173
+ result = test.SearchBirdseyePositions(SearchBirdseyePositionsRequest.new(15, 0, '{match fp ASA*}', 0))
174
+ pp result.searchBirdseyePositionsResult
175
+
176
+ #SearchCount
177
+ result = test.SearchCount(SearchCountRequest.new('-type B77*'))
178
+ pp result.searchCountResult
179
+
180
+ #SetAlert
181
+ alert = SetAlertRequest.new()
182
+ alert.alert_id = 0
183
+ alert.ident = "AWE652"
184
+ alert.channels = "{16 e_filed e_departure e_arrival e_diverted e_cancelled}"
185
+ alert.date_start = alert.date_end = 1380326400
186
+ alert.enabled = true
187
+ alert.max_weekly = 1000
188
+ result = test.SetAlert(alert)
189
+ pp result.setAlertResult
190
+
191
+ #SetMaximumResultSize
192
+ result = test.SetMaximumResultSize(SetMaximumResultSizeRequest.new(15))
193
+ pp result.setMaximumResultSizeResult
194
+
195
+ #Taf
196
+ result = test.Taf(TafRequest.new('KSMF'))
197
+ pp result.tafResult
198
+
199
+ #TailOwner
200
+ result = test.TailOwner(TailOwnerRequest.new("SKW5463"))
201
+ pp result.tailOwnerResult
202
+
203
+ #ZipcodeInfo
204
+ result = test.ZipcodeInfo(ZipcodeInfoRequest.new('90210'))
205
+ pp result.zipcodeInfoResult
@@ -0,0 +1,2405 @@
1
+ #AircraftType
2
+ class AircraftTypeRequest
3
+ attr_accessor :type
4
+ def initialize(type = nil)
5
+ @type = type
6
+ end
7
+ def post
8
+ "type=#@type"
9
+ end
10
+ end
11
+
12
+ class AircraftTypeResults
13
+ attr_accessor :aircraftTypeResult
14
+ def initialize(aircraftTypeResult = nil)
15
+ aircraftTypeResult = JSON.parse(aircraftTypeResult)['AircraftTypeResult']
16
+ @aircraftTypeResult = AircraftTypeStruct.new(aircraftTypeResult['description'], aircraftTypeResult['manufacturer'], aircraftTypeResult['type'])
17
+ end
18
+ end
19
+
20
+ class AircraftTypeStruct
21
+ attr_accessor :description, :manufacturer, :type
22
+ def initialize (description = nil, manufacturer = nil, type = nil)
23
+ @manufacturer = manufacturer
24
+ @type = type
25
+ @description = description
26
+ end
27
+ end
28
+
29
+ #AirlineFlightInfo
30
+ class AirlineFlightInfoRequest
31
+ attr_accessor :faFlightID
32
+ def initialize(faFlightID = nil)
33
+ @faFlightID = faFlightID
34
+ end
35
+ def post
36
+ "faFlightID=#@faFlightID"
37
+ end
38
+ end
39
+
40
+ class AirlineFlightInfoResults
41
+ attr_accessor :airlineFlightInfoResult
42
+ def initialize(airlineFlightInfoResult = nil)
43
+ airlineFlightInfoResult = JSON.parse(airlineFlightInfoResult)['AirlineFlightInfoResult']
44
+ @airlineFlightInfoResult = AirlineFlightInfoStruct.new(
45
+ airlineFlightInfoResult['bag_claim'],
46
+ airlineFlightInfoResult['codeshares'],
47
+ airlineFlightInfoResult['faFlightID'],
48
+ airlineFlightInfoResult['gate_dest'],
49
+ airlineFlightInfoResult['gate_orig'],
50
+ airlineFlightInfoResult['ident'],
51
+ airlineFlightInfoResult['meal_service'],
52
+ airlineFlightInfoResult['seats_cabin_business'],
53
+ airlineFlightInfoResult['seats_cabin_coach'],
54
+ airlineFlightInfoResult['seats_cabin_first'],
55
+ airlineFlightInfoResult['tailnumber'],
56
+ airlineFlightInfoResult['terminal_dest'],
57
+ airlineFlightInfoResult['terminal_orig']
58
+ )
59
+ end
60
+ end
61
+
62
+ class AirlineFlightInfoStruct
63
+ attr_accessor :bag_claim,
64
+ :codeshares,
65
+ :faFlightID,
66
+ :gate_dest,
67
+ :gate_orig,
68
+ :ident,
69
+ :meal_service,
70
+ :seats_cabin_business,
71
+ :seats_cabin_coach,
72
+ :seats_cabin_first,
73
+ :tailnumber,
74
+ :terminal_dest,
75
+ :terminal_orig
76
+
77
+ def initialize (bag_claim = nil,
78
+ codeshares = [],
79
+ faFlightID = nil,
80
+ gate_dest = nil,
81
+ gate_origin = nil,
82
+ ident = nil,
83
+ meal_service = nil,
84
+ seats_cabin_business = nil,
85
+ seats_cabin_coach = nil,
86
+ seats_cabin_first = nil,
87
+ tailnumber = nil,
88
+ terminal_dest = nil,
89
+ terminal_orig = nil)
90
+ @bag_claim = bag_claim
91
+ @codeshares = codeshares
92
+ @faFlightID = faFlightID
93
+ @gate_dest = gate_dest
94
+ @gate_origin = gate_origin
95
+ @ident = ident
96
+ @meal_service = meal_service
97
+ @seats_cabin_business = seats_cabin_business
98
+ @seats_cabin_coach = seats_cabin_coach
99
+ @seats_cabin_first = seats_cabin_first
100
+ @tailnumber = tailnumber
101
+ @terminal_dest = terminal_dest
102
+ @terminal_orig = terminal_orig
103
+ end
104
+ end
105
+
106
+ #AirlineFlightSchedule
107
+ class AirlineFlightSchedulesRequest
108
+ attr_accessor :airline, :destination, :endDate, :flightno, :howMany, :offset, :origin, :startDate
109
+ def initialize(airline = nil, destination = nil, endDate = nil, flightno = nil, howMany = nil, offset = nil, origin = nil, startDate = nil)
110
+ @airline = airline
111
+ @destination = destination
112
+ @endDate = endDate
113
+ @flightno = flightno
114
+ @howMany = howMany
115
+ @offset = offset
116
+ @origin = origin
117
+ @startDate = startDate
118
+ end
119
+ def post
120
+ "airline=#@airline&destination=#@destination&endDate=#@endDate&flightno=#@flightno&howMany=#@howMany&offset=#@offset&origin=#@origin&startDate=#@startDate"
121
+ end
122
+ end
123
+
124
+ class AirlineFlightSchedulesResults
125
+ attr_accessor :airlineFlightSchedulesResult
126
+ def initialize(airlineFlightSchedulesResult = nil)
127
+ airlineFlightSchedulesResult = JSON.parse(airlineFlightSchedulesResult)['AirlineFlightSchedulesResult']
128
+ @airlineFlightSchedulesResult = ArrayOfAirlineFlightScheduleStruct.new([], airlineFlightSchedulesResult['next_offset'])
129
+ airlineFlightSchedulesResult['data'].each do |data|
130
+ @airlineFlightSchedulesResult.data << AirlineFlightScheduleStruct.new(data['actual_ident'],
131
+ data['aircrafttype'],
132
+ data['arrivaltime'],
133
+ data['departuretime'],
134
+ data['destination'],
135
+ data['ident'],
136
+ data['meal_service'],
137
+ data['origin'],
138
+ data['seats_cabin_business'],
139
+ data['seats_cabin_coach'],
140
+ data['seats_cabin_first']
141
+ )
142
+ end
143
+ end
144
+ end
145
+
146
+ class AirlineFlightScheduleStruct
147
+ attr_accessor :actual_ident,
148
+ :aircrafttype,
149
+ :arrivaltime,
150
+ :departuretime,
151
+ :destination,
152
+ :ident,
153
+ :meal_service,
154
+ :origin,
155
+ :seats_cabin_business,
156
+ :seats_cabin_coach,
157
+ :seats_cabin_first
158
+
159
+ def initialize (actual_ident = nil,
160
+ aircrafttype = nil,
161
+ arrivaltime = nil,
162
+ departuretime = nil,
163
+ destination = nil,
164
+ ident = nil,
165
+ meal_service = nil,
166
+ origin = nil,
167
+ seats_cabin_business = nil,
168
+ seats_cabin_coach = nil,
169
+ seats_cabin_first = nil
170
+ )
171
+ @actual_ident = actual_ident
172
+ @aircrafttype = aircrafttype
173
+ @arrivaltime = arrivaltime
174
+ @departuretime = departuretime
175
+ @destination = destination
176
+ @ident = ident
177
+ @meal_service = meal_service
178
+ @origin = origin
179
+ @seats_cabin_business = seats_cabin_business
180
+ @seats_cabin_coach = seats_cabin_coach
181
+ @seats_cabin_first = seats_cabin_first
182
+ end
183
+
184
+ end
185
+
186
+ class ArrayOfAirlineFlightScheduleStruct
187
+ attr_accessor :data, :next_offset
188
+ def initialize(data = [], next_offset = nil)
189
+ @data = data
190
+ @next_offset = next_offset
191
+ end
192
+ end
193
+
194
+ #AirlineInfoRequest
195
+ class AirlineInfoRequest
196
+ attr_accessor :airlineCode
197
+ def initialize(airlineCode = nil)
198
+ @airlineCode = airlineCode
199
+ end
200
+ def post
201
+ "airlineCode=#@airlineCode"
202
+ end
203
+ end
204
+
205
+ class AirlineInfoResults
206
+ attr_accessor :airlineInfoResult
207
+ def initialize(airlineInfoResult = nil)
208
+ airlineInfoResult = JSON.parse(airlineInfoResult)['AirlineInfoResult']
209
+ @airlineInfoResult = AirlineInfoStruct.new(airlineInfoResult['callsign'],
210
+ airlineInfoResult['country'],
211
+ airlineInfoResult['location'],
212
+ airlineInfoResult['name'],
213
+ airlineInfoResult['phone'],
214
+ airlineInfoResult['shortname'],
215
+ airlineInfoResult['url']
216
+ )
217
+ end
218
+ end
219
+
220
+ class AirlineInfoStruct
221
+ attr_accessor :callsign, :country, :location, :name, :phone, :shortname, :url
222
+ def initialize (callsign = nil, country = nil, location = nil, name = nil, phone = nil, shortname = nil, url = nil)
223
+ @callsign = callsign
224
+ @country = country
225
+ @location = location
226
+ @name = name
227
+ @phone = phone
228
+ @shortname = shortname
229
+ @url = url
230
+ end
231
+ end
232
+
233
+
234
+ #AirlineInsight
235
+ class AirlineInsightRequest
236
+ attr_accessor :destination, :origin, :reportType
237
+ def initialize(destination = nil, origin = nil, reportType = nil)
238
+ @destination = destination
239
+ @origin = origin
240
+ @reportType = reportType
241
+ end
242
+ def post
243
+ "destination=#@destination&origin=#@origin&reportType=#@reportType"
244
+ end
245
+ end
246
+
247
+ class AirlineInsightResults
248
+ attr_accessor :airlineInsightResult
249
+ def initialize(airlineInsightResult = nil)
250
+ airlineInsightResult = JSON.parse(airlineInsightResult)['AirlineInsightResult']
251
+ @airlineInsightResult = ArrayOfAirlineInsightStruct.new([], airlineInsightResult['end_date'], airlineInsightResult['start_date'])
252
+ airlineInsightResult['data'].each do |data|
253
+ @airlineInsightResult.data << AirlineInsightStruct.new(data['carrier'],
254
+ data['destination'],
255
+ data['fare_max'],
256
+ data['fare_median'],
257
+ data['fare_min'],
258
+ data['flights_performed'],
259
+ data['flights_scheduled'],
260
+ data['layover'],
261
+ data['opcarrier'],
262
+ data['origin'],
263
+ data['percent'],
264
+ data['total_mail'],
265
+ data['total_passengers'],
266
+ data['total_payload'],
267
+ data['total_seats']
268
+ )
269
+ end
270
+ end
271
+ end
272
+
273
+ class AirlineInsightStruct
274
+ attr_accessor :carrier,
275
+ :destination,
276
+ :fare_max,
277
+ :fare_median,
278
+ :fare_min,
279
+ :flights_performed,
280
+ :flights_scheduled,
281
+ :layover,
282
+ :opcarrier,
283
+ :origin,
284
+ :percent,
285
+ :total_mail,
286
+ :total_passengers,
287
+ :total_payload,
288
+ :total_seats
289
+
290
+ def initialize (carrier = nil,
291
+ destination = nil,
292
+ fare_max = nil,
293
+ fare_median = nil,
294
+ fare_min = nil,
295
+ flights_performed = nil,
296
+ flights_scheduled = nil,
297
+ layover = nil,
298
+ opcarrier = nil,
299
+ origin = nil,
300
+ percent = nil,
301
+ total_mail = nil,
302
+ total_passengers = nil,
303
+ total_payload = nil,
304
+ total_seats = nil)
305
+ @carrier = carrier
306
+ @destination = destination
307
+ @fare_max = fare_max
308
+ @fare_median = fare_median
309
+ @fare_min = fare_min
310
+ @flights_performed = flights_performed
311
+ @flights_scheduled = flights_scheduled
312
+ @layover = layover
313
+ @opcarrier = opcarrier
314
+ @origin = origin
315
+ @percent = percent
316
+ @total_mail = total_mail
317
+ @total_passengers = total_passengers
318
+ @total_payload = total_payload
319
+ @total_seats = total_seats
320
+ end
321
+ end
322
+
323
+ class ArrayOfAirlineInsightStruct
324
+ attr_accessor :data, :end_date, :start_date
325
+ def initialize(data = [], end_date = nil, start_date = nil)
326
+ @data = data
327
+ @end_date = end_date
328
+ @start_date = start_date
329
+ end
330
+ end
331
+
332
+
333
+ #AirportInfo
334
+ class AirportInfoRequest
335
+ attr_accessor :airportCode
336
+ def initialize(airportCode = nil)
337
+ @airportCode = airportCode
338
+ end
339
+ def post
340
+ "airportCode=#@airportCode"
341
+ end
342
+ end
343
+
344
+ class AirportInfoResults
345
+ attr_accessor :airportInfoResult
346
+ def initialize(airportInfoResult = nil)
347
+ airportInfoResult = JSON.parse(airportInfoResult)['AirportInfoResult']
348
+ @airportInfoResult = AirportInfoStruct.new(airportInfoResult['latitude'],
349
+ airportInfoResult['location'],
350
+ airportInfoResult['longitude'],
351
+ airportInfoResult['name'],
352
+ airportInfoResult['timzone'],
353
+ )
354
+ end
355
+ end
356
+
357
+ class AirportInfoStruct
358
+ attr_accessor :latitude, :location, :longitude, :name, :timezone
359
+ def initialize (latitude = nil, location = nil, longitude = nil, name = nil, timezone = nil)
360
+ @latitude = latitude
361
+ @location = location
362
+ @longitude = longitude
363
+ @name = name
364
+ @timezone = timezone
365
+ end
366
+ end
367
+
368
+ #AllAirlines
369
+ class AllAirlinesRequest
370
+ def initialize()
371
+ end
372
+ def post
373
+ ""
374
+ end
375
+ end
376
+
377
+ class AllAirlinesResults
378
+ attr_accessor :allAirlinesResult
379
+ def initialize(allAirlinesResult = nil)
380
+ allAirlinesResult = JSON.parse(allAirlinesResult)['AllAirlinesResult']
381
+ @allAirlinesResult = ArrayOfString.new()
382
+ allAirlinesResult['data'].each do |data|
383
+ @allAirlinesResult.data << data
384
+ end
385
+ end
386
+ end
387
+
388
+ class ArrayOfString
389
+ attr_accessor :data
390
+ def initialize (data = [])
391
+ @data = data
392
+ end
393
+ end
394
+
395
+ #AllAirports
396
+ class AllAirportsRequest
397
+ def initialize()
398
+ end
399
+ def post
400
+ ""
401
+ end
402
+ end
403
+
404
+ class AllAirportsResults
405
+ attr_accessor :allAirportsResult
406
+ def initialize(allAirportsResult = nil)
407
+ allAirportsResult = JSON.parse(allAirportsResult)['AllAirportsResult']
408
+ @allAirportsResult = ArrayOfString.new()
409
+ allAirportsResult['data'].each do |data|
410
+ @allAirportsResult.data << data
411
+ end
412
+ end
413
+ end
414
+
415
+ #Arrived
416
+ class ArrivedRequest
417
+ attr_accessor :airport, :filter, :howMany, :offset
418
+ def initialize(airport = nil, filter = nil, howMany = nil, offset = nil)
419
+ @airport = airport
420
+ @filter = filter
421
+ @howMany = howMany
422
+ @offset = offset
423
+ end
424
+ def post
425
+ "airport=#@airport&filter=#@filter&howMany=#@howMany&offset=#@offset"
426
+ end
427
+ end
428
+
429
+ class ArrivedResults
430
+ attr_accessor :arrivedResult
431
+ def initialize(arrivedResult = nil)
432
+ arrivedResult = JSON.parse(arrivedResult)['ArrivedResult']
433
+ @arrivedResult = ArrivalStruct.new([], arrivedResult['next_offset'])
434
+ arrivedResult['arrivals'].each do |arrival|
435
+ @arrivedResult.arrivals << ArrivalFlightStruct.new(arrival['actualarrivaltime'],
436
+ arrival['actualdeparturetime'],
437
+ arrival['aircrafttype'],
438
+ arrival['destination'],
439
+ arrival['destinationCity'],
440
+ arrival['destinationName'],
441
+ arrival['ident'],
442
+ arrival['origin'],
443
+ arrival['originCity'],
444
+ arrival['originName']
445
+ )
446
+ end
447
+ end
448
+ end
449
+
450
+ class ArrivalStruct
451
+ attr_accessor :arrivals, :next_offset
452
+ def initialize (arrivals = [], next_offset = nil)
453
+ @arrivals = arrivals
454
+ @next_offset = next_offset
455
+ end
456
+ end
457
+
458
+ class ArrivalFlightStruct
459
+ attr_accessor :actualarrivaltime,
460
+ :actualdeparturetime,
461
+ :aircrafttype,
462
+ :destination,
463
+ :destinationCity,
464
+ :destinationName,
465
+ :ident,
466
+ :origin,
467
+ :originCity,
468
+ :originName
469
+
470
+ def initialize(actualarrivaltime = nil,
471
+ actualdeparturetime = nil,
472
+ aircrafttype = nil,
473
+ destination = nil,
474
+ destinationCity = nil,
475
+ destinationName = nil,
476
+ ident = nil,
477
+ origin = nil,
478
+ originCity = nil,
479
+ originName = nil
480
+ )
481
+ @actualarrivaltime = actualarrivaltime
482
+ @actualdeparturetime = actualdeparturetime
483
+ @aircrafttype = aircrafttype
484
+ @destination = destination
485
+ @destinationCity = destinationCity
486
+ @destinationName = destinationName
487
+ @ident = ident
488
+ @origin = origin
489
+ @originCity = originCity
490
+ @originName = originName
491
+ end
492
+ end
493
+
494
+
495
+ #BlockIdentCheck
496
+ class BlockIdentCheckRequest
497
+ attr_accessor :ident
498
+ def initialize(ident = nil)
499
+ @ident = ident
500
+ end
501
+ def post
502
+ "ident=#@ident"
503
+ end
504
+ end
505
+
506
+ class BlockIdentCheckResults
507
+ attr_accessor :blockIdentCheckResult
508
+ def initialize(blockIdentCheckResult = nil)
509
+ blockIdentCheckResult = JSON.parse(blockIdentCheckResult)['BlockIdentCheckResult']
510
+ @blockIdentCheckResult = blockIdentCheckResult
511
+ end
512
+ end
513
+
514
+
515
+ #CountAirportOperations
516
+ class CountAirportOperationsRequest
517
+ attr_accessor :airport
518
+ def initialize(airport = nil)
519
+ @airport = airport
520
+ end
521
+ def post
522
+ "airport=#@airport"
523
+ end
524
+ end
525
+
526
+ class CountAirportOperationsResults
527
+ attr_accessor :countAirportOperationsResult
528
+ def initialize(countAirportOperationsResult = nil)
529
+ countAirportOperationsResult = JSON.parse(countAirportOperationsResult)['CountAirportOperationsResult']
530
+ @countAirportOperationsResult = CountAirportOperationsStruct.new(countAirportOperationsResult['departed'],
531
+ countAirportOperationsResult['enroute'],
532
+ countAirportOperationsResult['scheduled_arrivals'],
533
+ countAirportOperationsResult['scheduled_departures']
534
+ )
535
+ end
536
+ end
537
+
538
+ class CountAirportOperationsStruct
539
+ attr_accessor :departed, :enroute, :scheduled_arrivals, :scheduled_departures
540
+ def initialize (departed = nil, enroute = nil, scheduled_arrivals = nil, scheduled_departures = nil)
541
+ @departed = departed
542
+ @enroute = enroute
543
+ @scheduled_arrivals = scheduled_arrivals
544
+ @scheduled_departures = scheduled_departures
545
+ end
546
+ end
547
+
548
+ #DecodeFlightRoute
549
+ class DecodeFlightRouteRequest
550
+ attr_accessor :faFlightID
551
+ def initialize(faFlightID = nil)
552
+ @faFlightID = faFlightID
553
+ end
554
+ def post
555
+ "faFlightID=#@faFlightID"
556
+ end
557
+ end
558
+
559
+ class DecodeFlightRouteResults
560
+ attr_accessor :decodeFlightRouteResult
561
+ def initialize(decodeFlightRouteResult = nil)
562
+ decodeFlightRouteResult= JSON.parse(decodeFlightRouteResult)['DecodeFlightRouteResult']
563
+ @decodeFlightRouteResult = ArrayOfFlightRouteStruct.new([],decodeFlightRouteResult['next_offset'])
564
+ decodeFlightRouteResult['data'].each do |data|
565
+ @decodeFlightRouteResult.data << FlightRouteStruct.new(data['latitude'],
566
+ data['longitude'],
567
+ data['name'],
568
+ data['type']
569
+ )
570
+ end
571
+ end
572
+ end
573
+
574
+ class FlightRouteStruct
575
+ attr_accessor :latitude, :longitude, :name, :type
576
+ def initialize (latitude = nil, longitude = nil, name = nil, type = nil)
577
+ @latitude = latitude
578
+ @longitude = longitude
579
+ @name = name
580
+ @type = type
581
+ end
582
+ end
583
+
584
+ class ArrayOfFlightRouteStruct
585
+ attr_accessor :data, :next_offset
586
+ def initialize (data = [], next_offset = nil)
587
+ @data = data
588
+ @next_offset = next_offset
589
+ end
590
+ end
591
+
592
+
593
+ #DecodeRoute
594
+ class DecodeRouteRequest
595
+ attr_accessor :destination, :origin, :route
596
+ def initialize(destination = nil, origin = nil, route = nil)
597
+ @destination = destination
598
+ @origin = origin
599
+ @route = route
600
+ end
601
+ def post
602
+ "destination=#@destination&origin=#@origin&route=#@route"
603
+ end
604
+ end
605
+
606
+ class DecodeRouteResults
607
+ attr_accessor :decodeRouteResult
608
+ def initialize(decodeRouteResult = nil)
609
+ decodeRouteResult = JSON.parse(decodeRouteResult)['DecodeRouteResult']
610
+ @decodeRouteResult = ArrayOfFlightRouteStruct.new([],decodeRouteResult['next_offset'])
611
+ decodeRouteResult['data'].each do |data|
612
+ @decodeRouteResult.data << FlightRouteStruct.new(data['latitude'],
613
+ data['longitude'],
614
+ data['name'],
615
+ data['type']
616
+ )
617
+ end
618
+ end
619
+ end
620
+
621
+
622
+ #DeleteAlert
623
+ class DeleteAlertRequest
624
+ attr_accessor :alert_id
625
+ def initialize(alert_id = nil)
626
+ @alert_id = alert_id
627
+ end
628
+ def post
629
+ "alert_id=#@alert_id"
630
+ end
631
+ end
632
+
633
+ class DeleteAlertResults
634
+ attr_accessor :deleteAlertResult
635
+ def initialize(deleteAlertResult = nil)
636
+ deleteAlertResult = JSON.parse(deleteAlertResult)['DeleteAlertResult']
637
+ @deleteAlertResult = deleteAlertResult
638
+ end
639
+ end
640
+
641
+
642
+ #Departed
643
+ class DepartedRequest
644
+ attr_accessor :airport, :filter, :howMany, :offset
645
+ def initialize(airport = nil, filter = nil, howMany = nil, offset = nil)
646
+ @airport = airport
647
+ @filter = filter
648
+ @howMany = howMany
649
+ @offset = offset
650
+ end
651
+ def post
652
+ "airport=#@airport&filter=#@filter&howMany=#@howMany&offset=#@offset"
653
+ end
654
+ end
655
+
656
+ class DepartedResults
657
+ attr_accessor :departedResult
658
+ def initialize(departedResult = nil)
659
+ departedResult = JSON.parse(departedResult)['DepartedResult']
660
+ @departedResult = DepartureStruct.new([], departedResult['next_offset'])
661
+ departedResult['departures'].each do |departure|
662
+ @departedResult.departures << DepartureFlightStruct.new(departure['actualarrivaltime'],
663
+ departure['actualdeparturetime'],
664
+ departure['aircrafttype'],
665
+ departure['destination'],
666
+ departure['destinationCity'],
667
+ departure['destinationName'],
668
+ departure['estimatedarrivaltime'],
669
+ departure['ident'],
670
+ departure['origin'],
671
+ departure['originCity'],
672
+ departure['originName']
673
+ )
674
+ end
675
+ end
676
+ end
677
+
678
+ class DepartureStruct
679
+ attr_accessor :departures, :next_offset
680
+ def initialize (departures = [], next_offset = nil)
681
+ @departures = departures
682
+ @next_offset = next_offset
683
+ end
684
+ end
685
+
686
+ class DepartureFlightStruct
687
+ attr_accessor :actualarrivaltime,
688
+ :actualdeparturetime,
689
+ :aircrafttype,
690
+ :destination,
691
+ :destinationCity,
692
+ :destinationName,
693
+ :estimatedarrivaltime,
694
+ :ident,
695
+ :origin,
696
+ :originCity,
697
+ :originName
698
+
699
+ def initialize(actualarrivaltime = nil,
700
+ actualdeparturetime = nil,
701
+ aircrafttype = nil,
702
+ destination = nil,
703
+ destinationCity = nil,
704
+ destinationName = nil,
705
+ estimatedarrivaltime = nil,
706
+ ident = nil,
707
+ origin = nil,
708
+ originCity = nil,
709
+ originName = nil
710
+ )
711
+ @actualarrivaltime = actualarrivaltime
712
+ @actualdeparturetime = actualdeparturetime
713
+ @aircrafttype = aircrafttype
714
+ @destination = destination
715
+ @destinationCity = destinationCity
716
+ @destinationName = destinationName
717
+ @estimatedarrivaltime = estimatedarrivaltime
718
+ @ident = ident
719
+ @origin = origin
720
+ @originCity = originCity
721
+ @originName = originName
722
+ end
723
+ end
724
+
725
+
726
+ #Enroute
727
+ class EnrouteRequest
728
+ attr_accessor :airport, :filter, :howMany, :offset
729
+ def initialize(airport = nil, filter = nil, howMany = nil, offset = nil)
730
+ @airport = airport
731
+ @filter = filter
732
+ @howMany = howMany
733
+ @offset = offset
734
+ end
735
+ def post
736
+ "airport=#@airport&filter=#@filter&howMany=#@howMany&offset=#@offset"
737
+ end
738
+ end
739
+
740
+ class EnrouteResults
741
+ attr_accessor :enrouteResult
742
+ def initialize(enrouteResult = nil)
743
+ enrouteResult = JSON.parse(enrouteResult)['EnrouteResult']
744
+ @enrouteResult = EnrouteStruct.new([], enrouteResult['next_offset'])
745
+ enrouteResult['enroute'].each do |enroute|
746
+ @enrouteResult.enroute << EnrouteFlightStruct.new(enroute['actualdeparturetime'],
747
+ enroute['aircrafttype'],
748
+ enroute['destination'],
749
+ enroute['destinationCity'],
750
+ enroute['destinationName'],
751
+ enroute['estimatedarrivaltime'],
752
+ enroute['filed_departuretime'],
753
+ enroute['ident'],
754
+ enroute['origin'],
755
+ enroute['originCity'],
756
+ enroute['originName']
757
+ )
758
+ end
759
+ end
760
+ end
761
+
762
+ class EnrouteStruct
763
+ attr_accessor :enroute, :next_offset
764
+ def initialize (enroute = [], next_offset = nil)
765
+ @enroute = enroute
766
+ @next_offset = next_offset
767
+ end
768
+ end
769
+
770
+ class EnrouteFlightStruct
771
+ attr_accessor :actualdeparturetime,
772
+ :aircrafttype,
773
+ :destination,
774
+ :destinationCity,
775
+ :destinationName,
776
+ :estimatedarrivaltime,
777
+ :filed_departuretime,
778
+ :ident,
779
+ :origin,
780
+ :originCity,
781
+ :originName
782
+
783
+ def initialize(actualdeparturetime = nil,
784
+ aircrafttype = nil,
785
+ destination = nil,
786
+ destinationCity = nil,
787
+ destinationName = nil,
788
+ estimatedarrivaltime = nil,
789
+ filed_departuretime = nil,
790
+ ident = nil,
791
+ origin = nil,
792
+ originCity = nil,
793
+ originName = nil
794
+ )
795
+ @actualdeparturetime = actualdeparturetime
796
+ @aircrafttype = aircrafttype
797
+ @destination = destination
798
+ @destinationCity = destinationCity
799
+ @destinationName = destinationName
800
+ @estimatedarrivaltime = estimatedarrivaltime
801
+ @filed_departuretime = filed_departuretime
802
+ @ident = ident
803
+ @origin = origin
804
+ @originCity = originCity
805
+ @originName = originName
806
+ end
807
+ end
808
+
809
+ #FleetArrived
810
+ class FleetArrivedRequest
811
+ attr_accessor :fleet, :howMany, :offset
812
+ def initialize(fleet = nil, howMany = nil, offset = nil)
813
+ @fleet = fleet
814
+ @howMany = howMany
815
+ @offset = offset
816
+ end
817
+ def post
818
+ "fleet=#@fleet&howMany=#@howMany&offset=#@offset"
819
+ end
820
+ end
821
+
822
+ class FleetArrivedResults
823
+ attr_accessor :fleetArrivedResult
824
+ def initialize(fleetArrivedResult = nil)
825
+ fleetArrivedResult = JSON.parse(fleetArrivedResult)['FleetArrivedResult']
826
+ @fleetArrivedResult = ArrivalStruct.new([], fleetArrivedResult['next_offset'])
827
+ fleetArrivedResult['arrivals'].each do |arrival|
828
+ @fleetArrivedResult.arrivals << ArrivalFlightStruct.new(arrival['actualarrivaltime'],
829
+ arrival['actualdeparturetime'],
830
+ arrival['aircrafttype'],
831
+ arrival['destination'],
832
+ arrival['destinationCity'],
833
+ arrival['destinationName'],
834
+ arrival['ident'],
835
+ arrival['origin'],
836
+ arrival['originCity'],
837
+ arrival['originName']
838
+ )
839
+ end
840
+ end
841
+ end
842
+
843
+
844
+ #FleetScheduled
845
+ class FleetScheduledRequest
846
+ attr_accessor :fleet, :howMany, :offset
847
+ def initialize(fleet = nil, howMany = nil, offset = nil)
848
+ @fleet = fleet
849
+ @howMany = howMany
850
+ @offset = offset
851
+ end
852
+ def post
853
+ "fleet=#@fleet&howMany=#@howMany&offset=#@offset"
854
+ end
855
+ end
856
+
857
+ class FleetScheduledResults
858
+ attr_accessor :fleetScheduledResult
859
+ def initialize(fleetScheduledResult = nil)
860
+ fleetScheduledResult = JSON.parse(fleetScheduledResult)['FleetScheduledResult']
861
+ @fleetScheduledResult = ScheduledStruct.new(fleetScheduledResult['next_offset'], [])
862
+ fleetScheduledResult['scheduled'].each do |scheduled|
863
+ @fleetScheduledResult.scheduled << ScheduledFlightStruct.new(scheduled['aircrafttype'],
864
+ scheduled['destination'],
865
+ scheduled['destinationCity'],
866
+ scheduled['destinationName'],
867
+ scheduled['estimatedarrivaltime'],
868
+ scheduled['filed_departuretime'],
869
+ scheduled['ident'],
870
+ scheduled['origin'],
871
+ scheduled['originCity'],
872
+ scheduled['originName']
873
+ )
874
+ end
875
+ end
876
+ end
877
+
878
+ class ScheduledStruct
879
+ attr_accessor :next_offset, :scheduled
880
+ def initialize (next_offset = nil, scheduled = [])
881
+ @next_offset = next_offset
882
+ @scheduled = scheduled
883
+ end
884
+ end
885
+
886
+ class ScheduledFlightStruct
887
+ attr_accessor :aircrafttype,
888
+ :destination,
889
+ :destinationCity,
890
+ :destinationName,
891
+ :estimatedarrivaltime,
892
+ :filed_departuretime,
893
+ :ident,
894
+ :origin,
895
+ :originCity,
896
+ :originName
897
+
898
+ def initialize(aircrafttype = nil,
899
+ destination = nil,
900
+ destinationCity = nil,
901
+ destinationName = nil,
902
+ estimatedarrivaltime = nil,
903
+ filed_departuretime = nil,
904
+ ident = nil,
905
+ origin = nil,
906
+ originCity = nil,
907
+ originName = nil
908
+ )
909
+ @aircrafttype = aircrafttype
910
+ @destination = destination
911
+ @destinationCity = destinationCity
912
+ @destinationName = destinationName
913
+ @estimatedarrivaltime = estimatedarrivaltime
914
+ @filed_departuretime = filed_departuretime
915
+ @ident = ident
916
+ @origin = origin
917
+ @originCity = originCity
918
+ @originName = originName
919
+ end
920
+ end
921
+
922
+
923
+ #FlightInfo
924
+ class FlightInfoRequest
925
+ attr_accessor :howMany, :ident
926
+ def initialize(howMany = nil, ident = nil)
927
+ @howMany = howMany
928
+ @ident = ident
929
+ end
930
+ def post
931
+ "howMany=#@howMany&ident=#@ident"
932
+ end
933
+ end
934
+
935
+ class FlightInfoResults
936
+ attr_accessor :flightInfoResult
937
+ def initialize(flightInfoResult = nil)
938
+ flightInfoResult = JSON.parse(flightInfoResult)['FlightInfoResult']
939
+ @flightInfoResult = FlightInfoStruct.new([], flightInfoResult['next_offset'])
940
+ flightInfoResult['flights'].each do |flight|
941
+ @flightInfoResult.flights << FlightStruct.new(flight['actualarrivaltime'],
942
+ flight['actualdeparturetime'],
943
+ flight['aircrafttype'],
944
+ flight['destination'],
945
+ flight['destinationCity'],
946
+ flight['destinationName'],
947
+ flight['diverted'],
948
+ flight['estimatedarrivaltime'],
949
+ flight['filed_airspeed_kts'],
950
+ flight['filed_airspeed_mach'],
951
+ flight['filed_altitude'],
952
+ flight['filed_departuretime'],
953
+ flight['filed_ete'],
954
+ flight['filed_time'],
955
+ flight['ident'],
956
+ flight['origin'],
957
+ flight['originCity'],
958
+ flight['originName'],
959
+ flight['route']
960
+ )
961
+ end
962
+ end
963
+ end
964
+
965
+ class FlightInfoStruct
966
+ attr_accessor :flights, :next_offset
967
+ def initialize (flights = [], next_offset = nil)
968
+ @flights = flights
969
+ @next_offset = next_offset
970
+ end
971
+ end
972
+
973
+ class FlightStruct
974
+ attr_accessor :actualarrivaltime,
975
+ :actualdeparturetime,
976
+ :aircrafttype,
977
+ :destination,
978
+ :destinationCity,
979
+ :destinationName,
980
+ :diverted,
981
+ :estimatedarrivaltime,
982
+ :filed_airspeed_kts,
983
+ :filed_airspeed_mach,
984
+ :filed_altitude,
985
+ :filed_departuretime,
986
+ :filed_ete,
987
+ :filed_time,
988
+ :ident,
989
+ :origin,
990
+ :originCity,
991
+ :originName,
992
+ :route
993
+
994
+ def initialize (actualarrivaltime = nil,
995
+ actualdeparturetime = nil,
996
+ aircrafttype = nil,
997
+ destination = nil,
998
+ destinationCity = nil,
999
+ destinationName = nil,
1000
+ diverted = nil,
1001
+ estimatedarrivaltime = nil,
1002
+ filed_airspeed_kts = nil,
1003
+ filed_airspeed_mach = nil,
1004
+ filed_altitude = nil,
1005
+ filed_departuretime = nil,
1006
+ filed_ete = nil,
1007
+ filed_time = nil,
1008
+ ident = nil,
1009
+ origin = nil,
1010
+ originCity = nil,
1011
+ originName = nil,
1012
+ route = nil
1013
+ )
1014
+ @actualarrivaltime = actualarrivaltime
1015
+ @actualdeparturetime = actualdeparturetime
1016
+ @aircrafttype = aircrafttype
1017
+ @destination = destination
1018
+ @destinationCity = destinationCity
1019
+ @destinationName = destinationName
1020
+ @diverted = diverted
1021
+ @estimatedarrivaltime = estimatedarrivaltime
1022
+ @filed_airspeed_kts = filed_airspeed_kts
1023
+ @filed_airspeed_mach = filed_airspeed_mach
1024
+ @filed_altitude = filed_altitude
1025
+ @filed_departuretime = filed_departuretime
1026
+ @filed_ete = filed_ete
1027
+ @filed_time = filed_time
1028
+ @ident = ident
1029
+ @origin = origin
1030
+ @originCity = originCity
1031
+ @originName = originName
1032
+ @route = route
1033
+ end
1034
+ end
1035
+
1036
+
1037
+ #FlightInfoEx
1038
+ class FlightInfoExRequest
1039
+ attr_accessor :howMany, :ident, :offset
1040
+ def initialize(howMany = nil, ident = nil, offset = nil)
1041
+ @howMany = howMany
1042
+ @ident = ident
1043
+ @offset = offset
1044
+ end
1045
+ def post
1046
+ "howMany=#@howMany&ident=#@ident&offset=#@offset"
1047
+ end
1048
+ end
1049
+
1050
+ class FlightInfoExResults
1051
+ attr_accessor :flightInfoExResult
1052
+ def initialize(flightInfoExResult = nil)
1053
+ flightInfoExResult = JSON.parse(flightInfoExResult)['FlightInfoExResult']
1054
+ @flightInfoExResult = FlightInfoExStruct.new([], flightInfoExResult['next_offset'])
1055
+ flightInfoExResult['flights'].each do |flight|
1056
+ @flightInfoExResult.flights << FlightExStruct.new(flight['actualarrivaltime'],
1057
+ flight['actualdeparturetime'],
1058
+ flight['aircrafttype'],
1059
+ flight['destination'],
1060
+ flight['destinationCity'],
1061
+ flight['destinationName'],
1062
+ flight['diverted'],
1063
+ flight['estimatedarrivaltime'],
1064
+ flight['faFlightID'],
1065
+ flight['filed_airspeed_kts'],
1066
+ flight['filed_airspeed_mach'],
1067
+ flight['filed_altitude'],
1068
+ flight['filed_departuretime'],
1069
+ flight['filed_ete'],
1070
+ flight['filed_time'],
1071
+ flight['ident'],
1072
+ flight['origin'],
1073
+ flight['originCity'],
1074
+ flight['originName'],
1075
+ flight['route']
1076
+ )
1077
+ end
1078
+ end
1079
+ end
1080
+
1081
+ class FlightInfoExStruct
1082
+ attr_accessor :flights, :next_offset
1083
+ def initialize (flights = [], next_offset = nil)
1084
+ @flights = flights
1085
+ @next_offset = next_offset
1086
+ end
1087
+ end
1088
+
1089
+ class FlightExStruct
1090
+ attr_accessor :actualarrivaltime,
1091
+ :actualdeparturetime,
1092
+ :aircrafttype,
1093
+ :destination,
1094
+ :destinationCity,
1095
+ :destinationName,
1096
+ :diverted,
1097
+ :estimatedarrivaltime,
1098
+ :faFlightID,
1099
+ :filed_airspeed_kts,
1100
+ :filed_airspeed_mach,
1101
+ :filed_altitude,
1102
+ :filed_departuretime,
1103
+ :filed_ete,
1104
+ :filed_time,
1105
+ :ident,
1106
+ :origin,
1107
+ :originCity,
1108
+ :originName,
1109
+ :route
1110
+
1111
+ def initialize (actualarrivaltime = nil,
1112
+ actualdeparturetime = nil,
1113
+ aircrafttype = nil,
1114
+ destination = nil,
1115
+ destinationCity = nil,
1116
+ destinationName = nil,
1117
+ diverted = nil,
1118
+ estimatedarrivaltime = nil,
1119
+ faFlightID = nil,
1120
+ filed_airspeed_kts = nil,
1121
+ filed_airspeed_mach = nil,
1122
+ filed_altitude = nil,
1123
+ filed_departuretime = nil,
1124
+ filed_ete = nil,
1125
+ filed_time = nil,
1126
+ ident = nil,
1127
+ origin = nil,
1128
+ originCity = nil,
1129
+ originName = nil,
1130
+ route = nil
1131
+ )
1132
+ @actualarrivaltime = actualarrivaltime
1133
+ @actualdeparturetime = actualdeparturetime
1134
+ @aircrafttype = aircrafttype
1135
+ @destination = destination
1136
+ @destinationCity = destinationCity
1137
+ @destinationName = destinationName
1138
+ @diverted = diverted
1139
+ @estimatedarrivaltime = estimatedarrivaltime
1140
+ @faFlightID = faFlightID
1141
+ @filed_airspeed_kts = filed_airspeed_kts
1142
+ @filed_airspeed_mach = filed_airspeed_mach
1143
+ @filed_altitude = filed_altitude
1144
+ @filed_departuretime = filed_departuretime
1145
+ @filed_ete = filed_ete
1146
+ @filed_time = filed_time
1147
+ @ident = ident
1148
+ @origin = origin
1149
+ @originCity = originCity
1150
+ @originName = originName
1151
+ @route = route
1152
+ end
1153
+ end
1154
+
1155
+
1156
+ #GetAlerts
1157
+ class GetAlertsRequest
1158
+ def initialize()
1159
+ end
1160
+ def post
1161
+ ""
1162
+ end
1163
+ end
1164
+
1165
+ class GetAlertsResults
1166
+ attr_accessor :getAlertsResult
1167
+ def initialize(getAlertsResult = nil)
1168
+ getAlertsResult = JSON.parse(getAlertsResult)['GetAlertsResult']
1169
+ @getAlertsResult = FlightAlertListing.new([], getAlertsResult['next_offset'])
1170
+ getAlertsResult['alerts'].each do |alert|
1171
+ myAlert = FlightAlertEntry.new(alert['aircrafttype'],
1172
+ alert['alert_changed'],
1173
+ alert['alert_created'],
1174
+ alert['alert_id'],
1175
+ [],
1176
+ alert['date_end'],
1177
+ alert['date_start'],
1178
+ alert['description'],
1179
+ alert['destination'],
1180
+ alert['enabled'],
1181
+ alert['ident'],
1182
+ alert['origin'],
1183
+ alert['type'],
1184
+ alert['user_ident']
1185
+ )
1186
+ alert['channels'].each do |channel|
1187
+ myAlert.channels << FlightAlertChannel.new(channel['channel_id'],
1188
+ channel['channel_name'],
1189
+ channel['e_arrival'],
1190
+ channel['e_cancelled'],
1191
+ channel['e_departure'],
1192
+ channel['e_diverted'],
1193
+ channel['e_filed'],
1194
+ channel['mask_summary'],
1195
+ channel['target_address']
1196
+ )
1197
+ end
1198
+ @getAlertsResult.alerts << myAlert
1199
+ end
1200
+ end
1201
+ end
1202
+
1203
+ class FlightAlertListing
1204
+ attr_accessor :alerts, :num_alerts
1205
+ def initialize (alerts = [], num_alerts = nil)
1206
+ @alerts = alerts
1207
+ @num_alerts = num_alerts
1208
+ end
1209
+ end
1210
+
1211
+ class FlightAlertEntry
1212
+ attr_accessor :aircrafttype,
1213
+ :alert_changed,
1214
+ :alert_created,
1215
+ :alert_id,
1216
+ :channels,
1217
+ :date_end,
1218
+ :date_start,
1219
+ :description,
1220
+ :destination,
1221
+ :enabled,
1222
+ :ident,
1223
+ :origin,
1224
+ :type,
1225
+ :user_ident
1226
+
1227
+ def initialize (aircrafttype = nil,
1228
+ alert_changed = nil,
1229
+ alert_created = nil,
1230
+ alert_id = nil,
1231
+ channels = [],
1232
+ date_end = nil,
1233
+ date_start = nil,
1234
+ description = nil,
1235
+ destination = nil,
1236
+ enabled = nil,
1237
+ ident = nil,
1238
+ origin = nil,
1239
+ type = nil,
1240
+ user_ident = nil
1241
+ )
1242
+ @aircrafttype = aircrafttype
1243
+ @alert_changed = alert_changed
1244
+ @alert_created = alert_created
1245
+ @alert_id = alert_id
1246
+ @channels = channels
1247
+ @date_end = date_end
1248
+ @date_start = date_start
1249
+ @description = description
1250
+ @destination = destination
1251
+ @enabled = enabled
1252
+ @ident = ident
1253
+ @origin = origin
1254
+ @type = type
1255
+ @user_ident = user_ident
1256
+ end
1257
+ end
1258
+
1259
+ class FlightAlertChannel
1260
+ attr_accessor :channel_id, :channel_name, :e_arrival, :e_cancelled, :e_departure, :e_diverted, :e_filed, :mask_summary, :target_address
1261
+ def initialize(channel_id = nil, channel_name = nil, e_arrival = nil, e_cancelled = nil, e_departure = nil, e_diverted = nil, e_filed = nil, mask_summary = nil, target_address = nil)
1262
+ @channel_id = channel_id
1263
+ @channel_name = channel_name
1264
+ @e_arrival = e_arrival
1265
+ @e_cancelled = e_cancelled
1266
+ @e_departure = e_departure
1267
+ @e_diverted = e_diverted
1268
+ @e_filed = e_filed
1269
+ @mask_summary = mask_summary
1270
+ @target_address = target_address
1271
+ end
1272
+ end
1273
+
1274
+
1275
+ #GetFlightID
1276
+ class GetFlightIDRequest
1277
+ attr_accessor :departureTime, :ident
1278
+ def initialize(departureTime = nil, ident = nil)
1279
+ @departureTime = departureTime
1280
+ @ident = ident
1281
+ end
1282
+ def post
1283
+ "departureTime=#@departureTime&ident=#@ident"
1284
+ end
1285
+ end
1286
+
1287
+ class GetFlightIDResults
1288
+ attr_accessor :getFlightIDResult
1289
+ def initialize(getFlightIDResult = nil)
1290
+ getFlightIDResult = JSON.parse(getFlightIDResult)['GetFlightIDResult']
1291
+ @getFlightIDResult = getFlightIDResult
1292
+ end
1293
+ end
1294
+
1295
+
1296
+ #GetHistoricalTrack
1297
+ class GetHistoricalTrackRequest
1298
+ attr_accessor :faFlightID
1299
+ def initialize(faFlightID = nil)
1300
+ @faFlightID = faFlightID
1301
+ end
1302
+ def post
1303
+ "faFlightID=#@faFlightID"
1304
+ end
1305
+ end
1306
+
1307
+ class GetHistoricalTrackResults
1308
+ attr_accessor :getHistoricalTrackResult
1309
+ def initialize(getHistoricalTrackResult = nil)
1310
+ getHistoricalTrackResult = JSON.parse(getHistoricalTrackResult)['GetHistoricalTrackResult']
1311
+ @getHistoricalTrackResult = ArrayOfTrackStruct.new()
1312
+ getHistoricalTrackResult['data'].each do |data|
1313
+ @getHistoricalTrackResult.data << TrackStruct.new(data['altitude'],
1314
+ data['altitudeChange'],
1315
+ data['altitudeStatus'],
1316
+ data['groundsped'],
1317
+ data['latitude'],
1318
+ data['longitude'],
1319
+ data['timestamp'],
1320
+ data['updateType']
1321
+ )
1322
+
1323
+ end
1324
+ end
1325
+ end
1326
+
1327
+ class ArrayOfTrackStruct
1328
+ attr_accessor :data
1329
+ def initialize (data = [])
1330
+ @data = data
1331
+ end
1332
+ end
1333
+
1334
+ class TrackStruct
1335
+ attr_accessor :altitude,
1336
+ :altitudeChange,
1337
+ :altitudeStatus,
1338
+ :groundspeed,
1339
+ :latitude,
1340
+ :longitude,
1341
+ :timestamp,
1342
+ :updateType
1343
+
1344
+ def initialize (altitude = nil,
1345
+ altitudeChange = nil,
1346
+ altitudeStatus = nil,
1347
+ groundspeed = nil,
1348
+ latitude = nil,
1349
+ longitude = nil,
1350
+ timestamp = nil,
1351
+ updateType = nil
1352
+ )
1353
+ @altitude = altitude
1354
+ @altitudeChange = altitudeChange
1355
+ @altitudeStatus = altitudeStatus
1356
+ @groundspeed = groundspeed
1357
+ @latitude = latitude
1358
+ @longitude = longitude
1359
+ @timestamp = timestamp
1360
+ @updateType = updateType
1361
+ end
1362
+ end
1363
+
1364
+
1365
+ #GetLastTrack
1366
+ class GetLastTrackRequest
1367
+ attr_accessor :ident
1368
+ def initialize(ident = nil)
1369
+ @ident = ident
1370
+ end
1371
+ def post
1372
+ "ident=#@ident"
1373
+ end
1374
+ end
1375
+
1376
+ class GetLastTrackResults
1377
+ attr_accessor :getLastTrackResult
1378
+ def initialize(getLastTrackResult = nil)
1379
+ getLastTrackResult = JSON.parse(getLastTrackResult)['GetLastTrackResult']
1380
+ @getLastTrackResult = ArrayOfTrackStruct.new()
1381
+ getLastTrackResult['data'].each do |data|
1382
+ @getLastTrackResult.data << TrackStruct.new(data['altitude'],
1383
+ data['altitudeChange'],
1384
+ data['altitudeStatus'],
1385
+ data['groundsped'],
1386
+ data['latitude'],
1387
+ data['longitude'],
1388
+ data['timestamp'],
1389
+ data['updateType']
1390
+ )
1391
+
1392
+ end
1393
+ end
1394
+ end
1395
+
1396
+
1397
+ #InboundFlightInfo
1398
+ class InboundFlightInfoRequest
1399
+ attr_accessor :faFlightID
1400
+ def initialize(faFlightID = nil)
1401
+ @faFlightID = faFlightID
1402
+ end
1403
+ def post
1404
+ "faFlightID=#@faFlightID"
1405
+ end
1406
+ end
1407
+
1408
+ class InboundFlightInfoResults
1409
+ attr_accessor :inboundFlightInfoResult
1410
+ def initialize(inboundFlightInfoResult = nil)
1411
+ inboundFlightInfoResult = JSON.parse(inboundFlightInfoResult)['InboundFlightInfoResult']
1412
+ @inboundFlightInfoResult = FlightExStruct.new(inboundFlightInfoResult['actualarrivaltime'],
1413
+ inboundFlightInfoResult['actualdeparturetime'],
1414
+ inboundFlightInfoResult['aircrafttype'],
1415
+ inboundFlightInfoResult['destination'],
1416
+ inboundFlightInfoResult['destinationCity'],
1417
+ inboundFlightInfoResult['destinationName'],
1418
+ inboundFlightInfoResult['diverted'],
1419
+ inboundFlightInfoResult['estimatedarrivaltime'],
1420
+ inboundFlightInfoResult['faFlightID'],
1421
+ inboundFlightInfoResult['filed_airspeed_kts'],
1422
+ inboundFlightInfoResult['filed_airspeed_mach'],
1423
+ inboundFlightInfoResult['filed_altitude'],
1424
+ inboundFlightInfoResult['filed_departuretime'],
1425
+ inboundFlightInfoResult['filed_ete'],
1426
+ inboundFlightInfoResult['filed_time'],
1427
+ inboundFlightInfoResult['ident'],
1428
+ inboundFlightInfoResult['origin'],
1429
+ inboundFlightInfoResult['originCity'],
1430
+ inboundFlightInfoResult['originName'],
1431
+ inboundFlightInfoResult['route']
1432
+ )
1433
+ end
1434
+ end
1435
+
1436
+
1437
+ #InFlightInfo
1438
+ class InFlightInfoRequest
1439
+ attr_accessor :ident
1440
+ def initialize(ident = nil)
1441
+ @ident = ident
1442
+ end
1443
+ def post
1444
+ "ident=#@ident"
1445
+ end
1446
+ end
1447
+
1448
+ class InFlightInfoResults
1449
+ attr_accessor :inFlightInfoResult
1450
+ def initialize(inFlightInfoResult = nil)
1451
+ inFlightInfoResult = JSON.parse(inFlightInfoResult)['InFlightInfoResult']
1452
+ @inFlightInfoResult = InFlightAircraftStruct.new(inFlightInfoResult['altitude'],
1453
+ inFlightInfoResult['altitudeChange'],
1454
+ inFlightInfoResult['altitudeStatus'],
1455
+ inFlightInfoResult['departureTime'],
1456
+ inFlightInfoResult['destination'],
1457
+ inFlightInfoResult['faFlightID'],
1458
+ inFlightInfoResult['firstPositionTime'],
1459
+ inFlightInfoResult['groundspeed'],
1460
+ inFlightInfoResult['heading'],
1461
+ inFlightInfoResult['highLatitude'],
1462
+ inFlightInfoResult['highLongitude'],
1463
+ inFlightInfoResult['ident'],
1464
+ inFlightInfoResult['latitude'],
1465
+ inFlightInfoResult['longitude'],
1466
+ inFlightInfoResult['lowLatitude'],
1467
+ inFlightInfoResult['lowLongitude'],
1468
+ inFlightInfoResult['origin'],
1469
+ inFlightInfoResult['prefix'],
1470
+ inFlightInfoResult['suffix'],
1471
+ inFlightInfoResult['timeout'],
1472
+ inFlightInfoResult['timestamp'],
1473
+ inFlightInfoResult['type'],
1474
+ inFlightInfoResult['updateType'],
1475
+ inFlightInfoResult['waypoints']
1476
+ )
1477
+
1478
+ end
1479
+ end
1480
+
1481
+ class InFlightAircraftStruct
1482
+ attr_accessor :altitude,
1483
+ :altitudeChange,
1484
+ :altitudeStatus,
1485
+ :departureTime,
1486
+ :destination,
1487
+ :faFlightID,
1488
+ :firstPositionTime,
1489
+ :groundspeed,
1490
+ :heading,
1491
+ :highLatitude,
1492
+ :highLongitude,
1493
+ :ident,
1494
+ :latitude,
1495
+ :longitude,
1496
+ :lowLatitude,
1497
+ :lowLongitude,
1498
+ :origin,
1499
+ :prefix,
1500
+ :suffix,
1501
+ :timeout,
1502
+ :timestamp,
1503
+ :type,
1504
+ :updateType,
1505
+ :waypoints
1506
+
1507
+ def initialize (altitude = nil,
1508
+ altitudeChange = nil,
1509
+ altitudeStatus = nil,
1510
+ departureTime = nil,
1511
+ destination = nil,
1512
+ faFlightID = nil,
1513
+ firstPositionTime = nil,
1514
+ groundspeed = nil,
1515
+ heading = nil,
1516
+ highLatitude = nil,
1517
+ highLongitude = nil,
1518
+ ident = nil,
1519
+ latitude = nil,
1520
+ longitude = nil,
1521
+ lowLatitude = nil,
1522
+ lowLongitude = nil,
1523
+ origin = nil,
1524
+ prefix = nil,
1525
+ suffix = nil,
1526
+ timeout = nil,
1527
+ timestamp = nil,
1528
+ type = nil,
1529
+ updateType = nil,
1530
+ waypoints = nil
1531
+ )
1532
+ @altitude = altitude
1533
+ @altitudeChange = altitudeChange
1534
+ @altitudeStatus = altitudeStatus
1535
+ @departureTime = departureTime
1536
+ @destination = destination
1537
+ @faFlightID = faFlightID
1538
+ @firstPositionTime = firstPositionTime
1539
+ @groundspeed = groundspeed
1540
+ @heading = heading
1541
+ @highLatitude = highLatitude
1542
+ @highLongitude = highLongitude
1543
+ @ident = ident
1544
+ @latitude = latitude
1545
+ @longitude = longitude
1546
+ @lowLatitude = lowLatitude
1547
+ @lowLongitude = lowLongitude
1548
+ @origin = origin
1549
+ @prefix = prefix
1550
+ @suffix = suffix
1551
+ @timeout = timeout
1552
+ @timestamp = timestamp
1553
+ @type = type
1554
+ @updateType = updateType
1555
+ @waypoints = waypoints
1556
+ end
1557
+ end
1558
+
1559
+
1560
+ #LatLongsToDistance
1561
+ class LatLongsToDistanceRequest
1562
+ attr_accessor :lat1, :lat2, :lon1, :lon2
1563
+ def initialize(lat1 = nil, lat2 = nil, lon1 = nil, lon2 = nil)
1564
+ @lat1 = lat1
1565
+ @lat2 = lat2
1566
+ @lon1 = lon1
1567
+ @lon2 = lon2
1568
+ end
1569
+ def post
1570
+ "lat1=#@lat1&lat2=#@lat2&lon1=#@lon1&lon2=#@lon2"
1571
+ end
1572
+ end
1573
+
1574
+ class LatLongsToDistanceResults
1575
+ attr_accessor :latLongsToDistanceResult
1576
+ def initialize(latLongsToDistanceResult = nil)
1577
+ latLongsToDistanceResult = JSON.parse(latLongsToDistanceResult)['LatLongsToDistanceResult']
1578
+ @latLongsToDistanceResult = latLongsToDistanceResult
1579
+ end
1580
+ end
1581
+
1582
+
1583
+ #LatLongsToHeading
1584
+ class LatLongsToHeadingRequest
1585
+ attr_accessor :lat1, :lat2, :lon1, :lon2
1586
+ def initialize(lat1 = nil, lat2 = nil, lon1 = nil, lon2 = nil)
1587
+ @lat1 = lat1
1588
+ @lat2 = lat2
1589
+ @lon1 = lon1
1590
+ @lon2 = lon2
1591
+ end
1592
+ def post
1593
+ "lat1=#@lat1&lat2=#@lat2&lon1=#@lon1&lon2=#@lon2"
1594
+ end
1595
+ end
1596
+
1597
+ class LatLongsToHeadingResults
1598
+ attr_accessor :latLongsToHeadingResult
1599
+ def initialize(latLongsToHeadingResult = nil)
1600
+ latLongsToHeadingResult = JSON.parse(latLongsToHeadingResult)['LatLongsToHeadingResult']
1601
+ @latLongsToHeadingResult = latLongsToHeadingResult
1602
+ end
1603
+ end
1604
+
1605
+
1606
+ #MapFlight
1607
+ class MapFlightRequest
1608
+ attr_accessor :ident, :mapHeight, :mapWidth
1609
+ def initialize(ident = nil, mapHeight = nil, mapWidth = nil)
1610
+ @ident = ident
1611
+ @mapHeight = mapHeight
1612
+ @mapWidth = mapWidth
1613
+ end
1614
+ def post
1615
+ "ident=#@ident&mapHeight=#@mapHeight&mapWidth=#@mapWidth"
1616
+ end
1617
+ end
1618
+
1619
+ class MapFlightResults
1620
+ attr_accessor :mapFlightResult
1621
+ def initialize(mapFlightResult = nil)
1622
+ mapFlightResult = JSON.parse(mapFlightResult)['MapFlightResult']
1623
+ @mapFlightResult = mapFlightResult
1624
+ end
1625
+ end
1626
+
1627
+
1628
+ #MapFlightEx
1629
+ class MapFlightExRequest
1630
+ attr_accessor :airports_expand_view,
1631
+ :faFlightID,
1632
+ :latlon_box,
1633
+ :layer_off,
1634
+ :layer_on,
1635
+ :mapHeight,
1636
+ :mapWidth,
1637
+ :show_airports,
1638
+ :show_data_blocks
1639
+
1640
+ def initialize(airports_expand_view = nil,
1641
+ faFlightID = nil,
1642
+ latlon_box = [],
1643
+ layer_off = [],
1644
+ layer_on = [],
1645
+ mapHeight = nil,
1646
+ mapWidth = nil,
1647
+ show_airports = nil,
1648
+ show_data_blocks = nil)
1649
+ @airports_expand_view = airports_expand_view
1650
+ @faFlightID = faFlightID
1651
+ @latlon_box = latlon_box
1652
+ @layer_off = layer_off
1653
+ @layer_on = layer_on
1654
+ @mapHeight = mapHeight
1655
+ @mapWidth = mapWidth
1656
+ @show_airports = show_airports
1657
+ @show_data_blocks = show_data_blocks
1658
+ end
1659
+ def post
1660
+ #TODO Clean this up when the Rest-Client properly handles arrays
1661
+ latlon_box = ""
1662
+ @latlon_box.each { |v| latlon_box = latlon_box + "latlon_box=" + v.to_s + "&" }
1663
+ @latlon_box = latlon_box
1664
+
1665
+ layer_on = ""
1666
+ @layer_on.each { |v| layer_on = layer_on + "layer_on=" + v.to_s + "&" }
1667
+ @layer_on = layer_on
1668
+
1669
+ layer_off = ""
1670
+ @layer_off.each { |v| layer_off = layer_off + "layer_off=" + v.to_s + "&" }
1671
+ @layer_off = layer_off
1672
+
1673
+ output = "airports_expand_view=#@airports_expand_view&faFlightID=#@faFlightID&#{@latlon_box}#{@layer_off}#{@layer_on}" +
1674
+ "mapHeight=#@mapHeight&mapWidth=#@mapWidth&show_airports=#@show_airports&show_data_blocks=#@show_data_blocks"
1675
+ output
1676
+ end
1677
+ end
1678
+
1679
+ class MapFlightExResults
1680
+ attr_accessor :mapFlightExResult
1681
+ def initialize(mapFlightExResult = nil)
1682
+ mapFlightExResult = JSON.parse(mapFlightExResult)['MapFlightExResult']
1683
+ @mapFlightExResult = mapFlightExResult
1684
+ end
1685
+ end
1686
+
1687
+
1688
+ #Metar
1689
+ class MetarRequest
1690
+ attr_accessor :airport
1691
+ def initialize(airport = nil)
1692
+ @airport = airport
1693
+ end
1694
+ def post
1695
+ "airport=#@airport"
1696
+ end
1697
+ end
1698
+
1699
+ class MetarResults
1700
+ attr_accessor :metarResult
1701
+ def initialize(metarResult = nil)
1702
+ metarResult = JSON.parse(metarResult)['MetarResult']
1703
+ @metarResult = metarResult
1704
+ end
1705
+ end
1706
+
1707
+
1708
+ #MetarEx
1709
+ class MetarExRequest
1710
+ attr_accessor :airport, :startTime, :howMany, :offset
1711
+ def initialize(airport = nil, startTime = nil, howMany = nil, offset = nil)
1712
+ @airport = airport
1713
+ @startTime = startTime
1714
+ @howMany = howMany
1715
+ @offset = offset
1716
+ end
1717
+ def post
1718
+ "airport=#@airport&startTime=#@startTime&howMany=#@howMany&offset=#@offset"
1719
+ end
1720
+ end
1721
+
1722
+ class MetarExResults
1723
+ attr_accessor :metarExResult
1724
+ def initialize(metarExResult = nil)
1725
+ metarExResult = JSON.parse(metarExResult)['MetarExResult']
1726
+ @metarExResult = ArrayOfMetarStruct.new([], metarExResult['next_offset'])
1727
+ metarExResult['metar'].each do |metar|
1728
+ @metarExResult.metar << MetarStruct.new(metar['airport'],
1729
+ metar['cloud_altitude'],
1730
+ metar['cloud_friendly'],
1731
+ metar['cloud_type'],
1732
+ metar['conditions'],
1733
+ metar['pressure'],
1734
+ metar['raw_data'],
1735
+ metar['temp_air'],
1736
+ metar['temp_dewpoint'],
1737
+ metar['temp_relhum'],
1738
+ metar['time'],
1739
+ metar['visibility'],
1740
+ metar['wind_direction'],
1741
+ metar['wind_friendly'],
1742
+ metar['wind_speed'],
1743
+ metar['wind_speed_gust']
1744
+ )
1745
+
1746
+ end
1747
+ end
1748
+ end
1749
+
1750
+ class ArrayOfMetarStruct
1751
+ attr_accessor :metar, :next_offset
1752
+ def initialize(metar = [], next_offset = nil)
1753
+ @metar = metar
1754
+ @next_offset = next_offset
1755
+ end
1756
+ end
1757
+
1758
+
1759
+ class MetarStruct
1760
+ attr_accessor :airport,
1761
+ :cloud_altitude,
1762
+ :cloud_friendly,
1763
+ :cloud_type,
1764
+ :conditions,
1765
+ :pressure,
1766
+ :raw_data,
1767
+ :temp_air,
1768
+ :temp_dewpoint,
1769
+ :temp_relhum,
1770
+ :time,
1771
+ :visibility,
1772
+ :wind_direction,
1773
+ :wind_friendly,
1774
+ :wind_speed,
1775
+ :wind_speed_gust
1776
+
1777
+ def initialize(airport = nil,
1778
+ cloud_altitude = nil,
1779
+ cloud_friendly = nil,
1780
+ cloud_type = nil,
1781
+ conditions = nil,
1782
+ pressure = nil,
1783
+ raw_data = nil,
1784
+ temp_air = nil,
1785
+ temp_dewpoint = nil,
1786
+ temp_relhum = nil,
1787
+ time = nil,
1788
+ visibility = nil,
1789
+ wind_direction = nil,
1790
+ wind_friendly = nil,
1791
+ wind_speed = nil,
1792
+ wind_speed_gust = nil
1793
+ )
1794
+ @airport = airport
1795
+ @cloud_altitude = cloud_altitude
1796
+ @cloud_friendly = cloud_friendly
1797
+ @cloud_type = cloud_type
1798
+ @conditions = conditions
1799
+ @pressure = pressure
1800
+ @raw_data = raw_data
1801
+ @temp_air = temp_air
1802
+ @temp_dewpoint = temp_dewpoint
1803
+ @temp_relhum = temp_relhum
1804
+ @time = time
1805
+ @visibility = visibility
1806
+ @wind_direction = wind_direction
1807
+ @wind_friendly = wind_friendly
1808
+ @wind_speed = wind_speed
1809
+ @wind_speed_gust = wind_speed_gust
1810
+ end
1811
+ end
1812
+
1813
+
1814
+ #NTaf
1815
+ class NTafRequest
1816
+ attr_accessor :airport
1817
+ def initialize(airport = nil)
1818
+ @airport = airport
1819
+ end
1820
+ def post
1821
+ "airport=#@airport"
1822
+ end
1823
+ end
1824
+
1825
+ class NTafResults
1826
+ attr_accessor :nTafResult
1827
+ def initialize(nTafResult = nil)
1828
+ nTafResult = JSON.parse(nTafResult)['NTafResult']
1829
+ @nTafResult = TafStruct.new(nTafResult['airport'],
1830
+ nTafResult['forecast'].each { |v| v},
1831
+ nTafResult['timeString']
1832
+ )
1833
+ end
1834
+ end
1835
+
1836
+ class TafStruct
1837
+ attr_accessor :airport, :forecast, :timeString
1838
+ def initialize(airport = nil, forecast = [], timeString = nil)
1839
+ @airport = airport
1840
+ @forecast = forecast
1841
+ @timeString = timeString
1842
+ end
1843
+ end
1844
+
1845
+
1846
+ #RegisterAlertEndpoint
1847
+ class RegisterAlertEndpointRequest
1848
+ attr_accessor :address, :format_type
1849
+ def initialize(address = nil, format_type = "json/post")
1850
+ @address = address
1851
+ @format_type = format_type
1852
+ end
1853
+ def post
1854
+ "address=#@address&format_type=#@format_type"
1855
+ end
1856
+ end
1857
+
1858
+ class RegisterAlertEndpointResults
1859
+ attr_accessor :registerAlertEndpointResult
1860
+ def initialize(registerAlertEndpointResult = nil)
1861
+ registerAlertEndpointResult = JSON.parse(registerAlertEndpointResult)['RegisterAlertEndpointResult']
1862
+ @registerAlertEndpointResult = registerAlertEndpointResult
1863
+ end
1864
+ end
1865
+
1866
+
1867
+ #RoutesBetweenAirports
1868
+ class RoutesBetweenAirportsRequest
1869
+ attr_accessor :destination, :origin
1870
+ def initialize(destination = nil, origin = nil)
1871
+ @destination = destination
1872
+ @origin = origin
1873
+ end
1874
+ def post
1875
+ "destination=#@destination&origin=#@origin"
1876
+ end
1877
+ end
1878
+
1879
+ class RoutesBetweenAirportsResults
1880
+ attr_accessor :routesBetweenAirportsResult
1881
+ def initialize(routesBetweenAirportsResult = nil)
1882
+ routesBetweenAirportsResult = JSON.parse(routesBetweenAirportsResult)['RoutesBetweenAirportsResult']
1883
+ @routesBetweenAirportsResult = ArrayOfRoutesBetweenAirportsStruct.new()
1884
+ routesBetweenAirportsResult['data'].each do |route|
1885
+ @routesBetweenAirportsResult.data << RoutesBetweenAirportsStruct.new(route['count'],
1886
+ route['filedAltitude'],
1887
+ route['route']
1888
+ )
1889
+
1890
+ end
1891
+ end
1892
+ end
1893
+
1894
+ class ArrayOfRoutesBetweenAirportsStruct
1895
+ attr_accessor :data
1896
+ def initialize(data = [])
1897
+ @data = data
1898
+ end
1899
+ end
1900
+
1901
+
1902
+ class RoutesBetweenAirportsStruct
1903
+ attr_accessor :count, :filedAltitude, :route
1904
+ def initialize(count = nil, filedAltitude = nil, route = nil)
1905
+ @count = count
1906
+ @filedAltitude = filedAltitude
1907
+ @route = route
1908
+ end
1909
+ end
1910
+
1911
+
1912
+ #RoutesBetweenAirportsEx
1913
+ class RoutesBetweenAirportsExRequest
1914
+ attr_accessor :destination, :howMany, :maxDepartureAge, :maxFileAge, :offset, :origin
1915
+ def initialize(destination = nil, howMany = nil, maxDepartureAge = nil, maxFileAge = nil, offset = nil, origin = nil)
1916
+ @destination = destination
1917
+ @howMany = howMany
1918
+ @maxDepartureAge = maxDepartureAge
1919
+ @maxFileAge = maxFileAge
1920
+ @offset = offset
1921
+ @origin = origin
1922
+ end
1923
+ def post
1924
+ "destination=#@destination&howMany=#@howMany&maxDepartureAge=#@maxDepartureAge&maxFileAge=#@maxFileAge&offset=#@offset&origin=#@origin"
1925
+ end
1926
+ end
1927
+
1928
+ class RoutesBetweenAirportsExResults
1929
+ attr_accessor :routesBetweenAirportsExResult
1930
+ def initialize(routesBetweenAirportsExResult = nil)
1931
+ routesBetweenAirportsExResult = JSON.parse(routesBetweenAirportsExResult)['RoutesBetweenAirportsExResult']
1932
+ @routesBetweenAirportsExResult = ArrayOfRoutesBetweenAirportsExStruct.new([], routesBetweenAirportsExResult['next_offset'])
1933
+ routesBetweenAirportsExResult['data'].each do |route|
1934
+ @routesBetweenAirportsExResult.data << RoutesBetweenAirportsExStruct.new(route['count'],
1935
+ route['filedAltitude_max'],
1936
+ route['filedAltitude_min'],
1937
+ route['last_departuretime'],
1938
+ route['route']
1939
+ )
1940
+
1941
+ end
1942
+ end
1943
+ end
1944
+
1945
+ class ArrayOfRoutesBetweenAirportsExStruct
1946
+ attr_accessor :data, :next_offset
1947
+ def initialize(data = [], next_offset = nil)
1948
+ @data = data
1949
+ @next_offset = next_offset
1950
+ end
1951
+ end
1952
+
1953
+
1954
+ class RoutesBetweenAirportsExStruct
1955
+ attr_accessor :count, :filedAltitude_max, :filedAltitude_min, :last_departuretime, :route
1956
+ def initialize(count = nil, filedAltitude_max = nil, filedAltitude_min = nil, last_departuretime = nil, route = nil)
1957
+ @count = count
1958
+ @filedAltitude_max = filedAltitude_max
1959
+ @filedAltitude_min = filedAltitude_min
1960
+ @last_departuretime = last_departuretime
1961
+ @route = route
1962
+ end
1963
+ end
1964
+
1965
+
1966
+ #Scheduled
1967
+ class ScheduledRequest
1968
+ attr_accessor :airport, :filter, :howMany, :offset
1969
+ def initialize(airport = nil, filter = nil, howMany = nil, offset = nil)
1970
+ @airport = airport
1971
+ @filter = filter
1972
+ @howMany = howMany
1973
+ @offset = offset
1974
+ end
1975
+ def post
1976
+ "airport=#@airport&filter=#@filter&howMany=#@howMany&offset=#@offset"
1977
+ end
1978
+ end
1979
+
1980
+ class ScheduledResults
1981
+ attr_accessor :scheduledResult
1982
+ def initialize(scheduledResult = nil)
1983
+ scheduledResult = JSON.parse(scheduledResult)['ScheduledResult']
1984
+ @scheduledResult = ScheduledStruct.new(scheduledResult['next_offset'], [])
1985
+ scheduledResult['scheduled'].each do |scheduled|
1986
+ @scheduledResult.scheduled << ScheduledFlightStruct.new(scheduled['aircrafttype'],
1987
+ scheduled['destination'],
1988
+ scheduled['destinationCity'],
1989
+ scheduled['destinationName'],
1990
+ scheduled['estimatedarrivaltime'],
1991
+ scheduled['filed_departuretime'],
1992
+ scheduled['ident'],
1993
+ scheduled['origin'],
1994
+ scheduled['originCity'],
1995
+ scheduled['originName']
1996
+ )
1997
+ end
1998
+ end
1999
+ end
2000
+
2001
+ class ScheduledStruct
2002
+ attr_accessor :next_offset, :scheduled
2003
+ def initialize (next_offset = nil, scheduled = [])
2004
+ @next_offset = next_offset
2005
+ @scheduled = scheduled
2006
+ end
2007
+ end
2008
+
2009
+ class ArrivalFlightStruct
2010
+ attr_accessor :aircrafttype,
2011
+ :destination,
2012
+ :destinationCity,
2013
+ :destinationName,
2014
+ :estimatedarrivaltime,
2015
+ :filed_departuretime,
2016
+ :ident,
2017
+ :origin,
2018
+ :originCity,
2019
+ :originName
2020
+
2021
+ def initialize(aircrafttype = nil,
2022
+ destination = nil,
2023
+ destinationCity = nil,
2024
+ destinationName = nil,
2025
+ estimatedarrivaltime = nil,
2026
+ filed_departuretime = nil,
2027
+ ident = nil,
2028
+ origin = nil,
2029
+ originCity = nil,
2030
+ originName = nil
2031
+ )
2032
+ @aircrafttype = aircrafttype
2033
+ @destination = destination
2034
+ @destinationCity = destinationCity
2035
+ @destinationName = destinationName
2036
+ @estimatedarrivaltime = estimatedarrivaltime
2037
+ @filed_departuretime = filed_departuretime
2038
+ @ident = ident
2039
+ @origin = origin
2040
+ @originCity = originCity
2041
+ @originName = originName
2042
+ end
2043
+ end
2044
+
2045
+
2046
+ #Search
2047
+ class SearchRequest
2048
+ attr_accessor :howMany, :offset, :query
2049
+ def initialize(howMany = nil, offset = nil, query = nil)
2050
+ @howMany = howMany
2051
+ @offset = offset
2052
+ @query = query
2053
+ end
2054
+ def post
2055
+ "howMany=#@howMany&offset=#@offset&query=#@query"
2056
+ end
2057
+ end
2058
+
2059
+ class SearchResults
2060
+ attr_accessor :searchResult
2061
+ def initialize(searchResult = nil)
2062
+ searchResult = JSON.parse(searchResult)['SearchResult']
2063
+ @searchResult = InFlightStruct.new([], searchResult['next_offset'])
2064
+ searchResult['aircraft'].each do |aircraft|
2065
+ @searchResult.aircraft << InFlightAircraftStruct.new(aircraft['altitude'],
2066
+ aircraft['altitudeChange'],
2067
+ aircraft['altitudeStatus'],
2068
+ aircraft['departureTime'],
2069
+ aircraft['destination'],
2070
+ aircraft['faFlightID'],
2071
+ aircraft['firstPositionTime'],
2072
+ aircraft['groundspeed'],
2073
+ aircraft['heading'],
2074
+ aircraft['highLatitude'],
2075
+ aircraft['highLongitude'],
2076
+ aircraft['ident'],
2077
+ aircraft['latitude'],
2078
+ aircraft['longitude'],
2079
+ aircraft['lowLatitude'],
2080
+ aircraft['lowLongitude'],
2081
+ aircraft['origin'],
2082
+ aircraft['prefix'],
2083
+ aircraft['suffix'],
2084
+ aircraft['timeout'],
2085
+ aircraft['timestamp'],
2086
+ aircraft['type'],
2087
+ aircraft['updateType'],
2088
+ aircraft['waypoints']
2089
+ )
2090
+ end
2091
+ end
2092
+ end
2093
+
2094
+ class InFlightStruct
2095
+ attr_accessor :aircraft, :next_offset
2096
+ def initialize(aircraft = [], next_offset = nil)
2097
+ @aircraft = aircraft
2098
+ @next_offset = next_offset
2099
+ end
2100
+ end
2101
+
2102
+
2103
+ #SearchBirdseyeInFlight
2104
+ class SearchBirdseyeInFlightRequest
2105
+ attr_accessor :howMany, :offset, :query
2106
+ def initialize(howMany = nil, offset = nil, query = nil)
2107
+ @howMany = howMany
2108
+ @offset = offset
2109
+ @query = query
2110
+ end
2111
+ def post
2112
+ "howMany=#@howMany&offset=#@offset&query=#@query"
2113
+ end
2114
+ end
2115
+
2116
+ class SearchBirdseyeInFlightResults
2117
+ attr_accessor :searchBirdseyeInFlightResult
2118
+ def initialize(searchBirdseyeInFlightResult = nil)
2119
+ searchBirdseyeInFlightResult = JSON.parse(searchBirdseyeInFlightResult)['SearchBirdseyeInFlightResult']
2120
+ @searchBirdseyeInFlightResult = InFlightStruct.new([], searchBirdseyeInFlightResult['next_offset'])
2121
+ searchBirdseyeInFlightResult['aircraft'].each do |aircraft|
2122
+ @searchBirdseyeInFlightResult.aircraft << InFlightAircraftStruct.new(aircraft['altitude'],
2123
+ aircraft['altitudeChange'],
2124
+ aircraft['altitudeStatus'],
2125
+ aircraft['departureTime'],
2126
+ aircraft['destination'],
2127
+ aircraft['faFlightID'],
2128
+ aircraft['firstPositionTime'],
2129
+ aircraft['groundspeed'],
2130
+ aircraft['heading'],
2131
+ aircraft['highLatitude'],
2132
+ aircraft['highLongitude'],
2133
+ aircraft['ident'],
2134
+ aircraft['latitude'],
2135
+ aircraft['longitude'],
2136
+ aircraft['lowLatitude'],
2137
+ aircraft['lowLongitude'],
2138
+ aircraft['origin'],
2139
+ aircraft['prefix'],
2140
+ aircraft['suffix'],
2141
+ aircraft['timeout'],
2142
+ aircraft['timestamp'],
2143
+ aircraft['type'],
2144
+ aircraft['updateType'],
2145
+ aircraft['waypoints']
2146
+ )
2147
+ end
2148
+ end
2149
+ end
2150
+
2151
+ #SearchBirdseyePositions
2152
+ class SearchBirdseyePositionsRequest
2153
+ attr_accessor :howMany, :offset, :query, :uniqueFlights
2154
+ def initialize(howMany = nil, offset = nil, query = nil, uniqueFlights = nil)
2155
+ @howMany = howMany
2156
+ @offset = offset
2157
+ @query = query
2158
+ @uniqueFlights = uniqueFlights
2159
+ end
2160
+ def post
2161
+ "howMany=#@howMany&offset=#@offset&query=#@query&uniqueFlights=#@uniqueFlights"
2162
+ end
2163
+ end
2164
+
2165
+ class SearchBirdseyePositionsResults
2166
+ attr_accessor :searchBirdseyePositionsResult
2167
+ def initialize(searchBirdseyePositionsResult = nil)
2168
+ searchBirdseyePositionsResult = JSON.parse(searchBirdseyePositionsResult)['SearchBirdseyePositionsResult']
2169
+ @searchBirdseyePositionsResult = ArrayOfTrackExStruct.new([], searchBirdseyePositionsResult['next_offset'])
2170
+ searchBirdseyePositionsResult['data'].each do |track|
2171
+ @searchBirdseyePositionsResult.data << TrackExStruct.new(track['altitude'],
2172
+ track['altitudeChange'],
2173
+ track['altitudeStatus'],
2174
+ track['faFlightID'],
2175
+ track['groundspeed'],
2176
+ track['latitude'],
2177
+ track['longitude'],
2178
+ track['timestamp'],
2179
+ track['updateType']
2180
+ )
2181
+ end
2182
+ end
2183
+ end
2184
+
2185
+ class ArrayOfTrackExStruct
2186
+ attr_accessor :data, :next_offset
2187
+ def initialize(data = [], next_offset = nil)
2188
+ @data = data
2189
+ @next_offset = next_offset
2190
+ end
2191
+ end
2192
+
2193
+ class TrackExStruct
2194
+ attr_accessor :altitude,
2195
+ :altitudeChange,
2196
+ :altitudeStatus,
2197
+ :faFlightID,
2198
+ :groundspeed,
2199
+ :latitude,
2200
+ :longitude,
2201
+ :timestamp,
2202
+ :updateType
2203
+
2204
+ def initialize(altitude = nil,
2205
+ altitudeChange = nil,
2206
+ altitudeStatus = nil,
2207
+ faFlightID = nil,
2208
+ groundspeed = nil,
2209
+ latitude = nil,
2210
+ longitude = nil,
2211
+ timestamp = nil,
2212
+ updateType = nil
2213
+ )
2214
+ @altitude = altitude
2215
+ @altitudeChange = altitudeChange
2216
+ @altitudeStatus = altitudeStatus
2217
+ @faFlightID = faFlightID
2218
+ @groundspeed = groundspeed
2219
+ @latitude = latitude
2220
+ @longitude = longitude
2221
+ @timestamp = timestamp
2222
+ @updateType = updateType
2223
+ end
2224
+ end
2225
+
2226
+
2227
+ #SearchCount
2228
+ class SearchCountRequest
2229
+ attr_accessor :query
2230
+ def initialize(query = nil)
2231
+ @query = query
2232
+ end
2233
+ def post
2234
+ "query=#@query"
2235
+ end
2236
+ end
2237
+
2238
+ class SearchCountResults
2239
+ attr_accessor :searchCountResult
2240
+ def initialize(searchCountResult = nil)
2241
+ searchCountResult = JSON.parse(searchCountResult)['SearchCountResult']
2242
+ @searchCountResult = searchCountResult
2243
+ end
2244
+ end
2245
+
2246
+
2247
+ #SetAlert
2248
+ class SetAlertRequest
2249
+ attr_accessor :aircrafttype,
2250
+ :alert_id,
2251
+ :channels,
2252
+ :date_end,
2253
+ :date_start,
2254
+ :destination,
2255
+ :enabled,
2256
+ :ident,
2257
+ :max_weekly,
2258
+ :origin
2259
+
2260
+ def initialize(aircrafttype = nil,
2261
+ alert_id = nil,
2262
+ channels = nil,
2263
+ date_end = nil,
2264
+ date_start = nil,
2265
+ destination = nil,
2266
+ enabled = nil,
2267
+ ident = nil,
2268
+ max_weekly = nil,
2269
+ origin = nil
2270
+ )
2271
+
2272
+ @aircrafttype = aircrafttype
2273
+ @alert_id = alert_id
2274
+ @channels = channels
2275
+ @date_end = date_end
2276
+ @date_start = date_start
2277
+ @destination = destination
2278
+ @enabled = enabled
2279
+ @ident = ident
2280
+ @max_weekly = max_weekly
2281
+ @origin = origin
2282
+ end
2283
+ def post
2284
+ "aircrafttype=#@aircrafttype&alert_id=#@alert_id&channels=#@channels&date_end=#@date_end&date_start=#@date_start" +
2285
+ "&destination=#@destination&enabled=#@enabled&ident=#@ident&max_weekly=#@max_weekly&origin=#@origin"
2286
+ end
2287
+ end
2288
+
2289
+ class SetAlertResults
2290
+ attr_accessor :setAlertResult
2291
+ def initialize(setAlertResult = nil)
2292
+ setAlertResult = JSON.parse(setAlertResult)['SetAlertResult']
2293
+ @setAlertResult = setAlertResult
2294
+ end
2295
+ end
2296
+
2297
+
2298
+ #SetMaximumResultSize
2299
+ class SetMaximumResultSizeRequest
2300
+ attr_accessor :max_size
2301
+ def initialize(max_size = nil)
2302
+ @max_size = max_size
2303
+ end
2304
+ def post
2305
+ "max_size=#@max_size"
2306
+ end
2307
+ end
2308
+
2309
+ class SetMaximumResultSizeResults
2310
+ attr_accessor :setMaximumResultSizeResult
2311
+ def initialize(setMaximumResultSizeResult = nil)
2312
+ setMaximumResultSizeResult = JSON.parse(setMaximumResultSizeResult)['SetMaximumResultSizeResult']
2313
+ @setMaximumResultSizeResult = setMaximumResultSizeResult
2314
+ end
2315
+ end
2316
+
2317
+
2318
+ #Taf
2319
+ class TafRequest
2320
+ attr_accessor :airport
2321
+ def initialize(airport = nil)
2322
+ @airport = airport
2323
+ end
2324
+ def post
2325
+ "airport=#@airport"
2326
+ end
2327
+ end
2328
+
2329
+ class TafResults
2330
+ attr_accessor :tafResult
2331
+ def initialize(tafResult = nil)
2332
+ tafResult = JSON.parse(tafResult)['TafResult']
2333
+ @tafResult = tafResult
2334
+ end
2335
+ end
2336
+
2337
+
2338
+ #TailOwner
2339
+ class TailOwnerRequest
2340
+ attr_accessor :ident
2341
+ def initialize(ident = nil)
2342
+ @ident = ident
2343
+ end
2344
+ def post
2345
+ "ident=#@ident"
2346
+ end
2347
+ end
2348
+
2349
+ class TailOwnerResults
2350
+ attr_accessor :tailOwnerResult
2351
+ def initialize(tailOwnerResult = nil)
2352
+ tailOwnerResult = JSON.parse(tailOwnerResult)['TailOwnerResult']
2353
+ @tailOwnerResult = TailOwnerStruct.new(tailOwnerResult['location'],
2354
+ tailOwnerResult['location2'],
2355
+ tailOwnerResult['owner'],
2356
+ tailOwnerResult['website']
2357
+ )
2358
+ end
2359
+ end
2360
+
2361
+ class TailOwnerStruct
2362
+ attr_accessor :location, :location2, :owner, :website
2363
+ def initialize(location = nil, location2 = nil, owner = nil, website = nil)
2364
+ @location = location
2365
+ @location2 = location2
2366
+ @owner = owner
2367
+ @website = website
2368
+ end
2369
+ end
2370
+
2371
+
2372
+ #ZipcodeInfo
2373
+ class ZipcodeInfoRequest
2374
+ attr_accessor :zipcode
2375
+ def initialize(zipcode = nil)
2376
+ @zipcode = zipcode
2377
+ end
2378
+ def post
2379
+ "zipcode=#@zipcode"
2380
+ end
2381
+ end
2382
+
2383
+ class ZipcodeInfoResults
2384
+ attr_accessor :zipcodeInfoResult
2385
+ def initialize(zipcodeInfoResult = nil)
2386
+ zipcodeInfoResult = JSON.parse(zipcodeInfoResult)['ZipcodeInfoResult']
2387
+ @zipcodeInfoResult = ZipcodeInfoStruct.new(zipcodeInfoResult['city'],
2388
+ zipcodeInfoResult['county'],
2389
+ zipcodeInfoResult['latitude'],
2390
+ zipcodeInfoResult['longitude'],
2391
+ zipcodeInfoResult['state']
2392
+ )
2393
+ end
2394
+ end
2395
+
2396
+ class ZipcodeInfoStruct
2397
+ attr_accessor :city, :county, :latitude, :longitude, :state
2398
+ def initialize(city = nil, county = nil, latitude = nil, longitude = nil, state = nil)
2399
+ @city = city
2400
+ @county = county
2401
+ @latitude = latitude
2402
+ @longitude = longitude
2403
+ @state = state
2404
+ end
2405
+ end