-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample.rb
More file actions
326 lines (297 loc) · 8.83 KB
/
example.rb
File metadata and controls
326 lines (297 loc) · 8.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
#!/usr/bin/env ruby
require 'DirectFlightDriver.rb'
username = ARGV.shift
apiKey = ARGV.shift
endpoint_url = ARGV.shift
obj = DirectFlightSoap.new(username, apiKey, endpoint_url)
# run ruby with -d to see SOAP wiredumps.
obj.wiredump_dev = STDERR if $DEBUG
# SYNOPSIS
# FlightInfo(ident, howMany)
#
# ARGS
# ident String - {http://www.w3.org/2001/XMLSchema}string
# howMany Int - {http://www.w3.org/2001/XMLSchema}int
#
# RETURNS
# v_return FlightInfoStruct - {http://directflight.flightaware.com/soap/DirectFlight}FlightInfoStruct
#
ident = howMany = nil
puts obj.flightInfo(ident, howMany)
# SYNOPSIS
# InFlightInfo(ident)
#
# ARGS
# ident String - {http://www.w3.org/2001/XMLSchema}string
#
# RETURNS
# v_return InFlightAircraftStruct - {http://directflight.flightaware.com/soap/DirectFlight}InFlightAircraftStruct
#
ident = nil
puts obj.inFlightInfo(ident)
# SYNOPSIS
# GetLastTrack(ident)
#
# ARGS
# ident String - {http://www.w3.org/2001/XMLSchema}string
#
# RETURNS
# v_return ArrayOfTrackStruct - {http://directflight.flightaware.com/soap/DirectFlight}ArrayOfTrackStruct
#
ident = nil
puts obj.getLastTrack(ident)
# SYNOPSIS
# Search(query, howMany, offset)
#
# ARGS
# query String - {http://www.w3.org/2001/XMLSchema}string
# howMany Int - {http://www.w3.org/2001/XMLSchema}int
# offset Int - {http://www.w3.org/2001/XMLSchema}int
#
# RETURNS
# v_return InFlightStruct - {http://directflight.flightaware.com/soap/DirectFlight}InFlightStruct
#
query = howMany = offset = nil
puts obj.search(query, howMany, offset)
# SYNOPSIS
# SearchCount(query)
#
# ARGS
# query String - {http://www.w3.org/2001/XMLSchema}string
#
# RETURNS
# v_return Int - {http://www.w3.org/2001/XMLSchema}int
#
query = nil
puts obj.searchCount(query)
# SYNOPSIS
# Scheduled(airport, howMany, filter, offset)
#
# ARGS
# airport String - {http://www.w3.org/2001/XMLSchema}string
# howMany Int - {http://www.w3.org/2001/XMLSchema}int
# filter String - {http://www.w3.org/2001/XMLSchema}string
# offset Int - {http://www.w3.org/2001/XMLSchema}int
#
# RETURNS
# v_return ScheduledStruct - {http://directflight.flightaware.com/soap/DirectFlight}ScheduledStruct
#
airport = howMany = filter = offset = nil
puts obj.scheduled(airport, howMany, filter, offset)
# SYNOPSIS
# Departed(airport, howMany, filter, offset)
#
# ARGS
# airport String - {http://www.w3.org/2001/XMLSchema}string
# howMany Int - {http://www.w3.org/2001/XMLSchema}int
# filter String - {http://www.w3.org/2001/XMLSchema}string
# offset Int - {http://www.w3.org/2001/XMLSchema}int
#
# RETURNS
# v_return DepartureStruct - {http://directflight.flightaware.com/soap/DirectFlight}DepartureStruct
#
airport = howMany = filter = offset = nil
puts obj.departed(airport, howMany, filter, offset)
# SYNOPSIS
# Enroute(airport, howMany, filter, offset)
#
# ARGS
# airport String - {http://www.w3.org/2001/XMLSchema}string
# howMany Int - {http://www.w3.org/2001/XMLSchema}int
# filter String - {http://www.w3.org/2001/XMLSchema}string
# offset Int - {http://www.w3.org/2001/XMLSchema}int
#
# RETURNS
# v_return EnrouteStruct - {http://directflight.flightaware.com/soap/DirectFlight}EnrouteStruct
#
airport = howMany = filter = offset = nil
puts obj.enroute(airport, howMany, filter, offset)
# SYNOPSIS
# FleetArrived(fleet, howMany, offset)
#
# ARGS
# fleet String - {http://www.w3.org/2001/XMLSchema}string
# howMany Int - {http://www.w3.org/2001/XMLSchema}int
# offset Int - {http://www.w3.org/2001/XMLSchema}int
#
# RETURNS
# v_return ArrivalStruct - {http://directflight.flightaware.com/soap/DirectFlight}ArrivalStruct
#
fleet = howMany = offset = nil
puts obj.fleetArrived(fleet, howMany, offset)
# SYNOPSIS
# Arrived(airport, howMany, filter, offset)
#
# ARGS
# airport String - {http://www.w3.org/2001/XMLSchema}string
# howMany Int - {http://www.w3.org/2001/XMLSchema}int
# filter String - {http://www.w3.org/2001/XMLSchema}string
# offset Int - {http://www.w3.org/2001/XMLSchema}int
#
# RETURNS
# v_return ArrivalStruct - {http://directflight.flightaware.com/soap/DirectFlight}ArrivalStruct
#
airport = howMany = filter = offset = nil
puts obj.arrived(airport, howMany, filter, offset)
# SYNOPSIS
# AllAirports
#
# ARGS
# N/A
#
# RETURNS
# v_return ArrayOfString - {http://directflight.flightaware.com/soap/DirectFlight}ArrayOfString
#
puts obj.allAirports
# SYNOPSIS
# ZipcodeInfo(zipcode)
#
# ARGS
# zipcode String - {http://www.w3.org/2001/XMLSchema}string
#
# RETURNS
# v_return ZipcodeInfoStruct - {http://directflight.flightaware.com/soap/DirectFlight}ZipcodeInfoStruct
#
zipcode = nil
puts obj.zipcodeInfo(zipcode)
# SYNOPSIS
# AirportInfo(airportCode)
#
# ARGS
# airportCode String - {http://www.w3.org/2001/XMLSchema}string
#
# RETURNS
# v_return AirportInfoStruct - {http://directflight.flightaware.com/soap/DirectFlight}AirportInfoStruct
#
airportCode = nil
puts obj.airportInfo(airportCode)
# SYNOPSIS
# TailOwner(ident)
#
# ARGS
# ident String - {http://www.w3.org/2001/XMLSchema}string
#
# RETURNS
# v_return TailOwnerStruct - {http://directflight.flightaware.com/soap/DirectFlight}TailOwnerStruct
#
ident = nil
puts obj.tailOwner(ident)
# SYNOPSIS
# RoutesBetweenAirports(origin, destination)
#
# ARGS
# origin String - {http://www.w3.org/2001/XMLSchema}string
# destination String - {http://www.w3.org/2001/XMLSchema}string
#
# RETURNS
# v_return ArrayOfRoutesBetweenAirportsStruct - {http://directflight.flightaware.com/soap/DirectFlight}ArrayOfRoutesBetweenAirportsStruct
#
origin = destination = nil
puts obj.routesBetweenAirports(origin, destination)
# SYNOPSIS
# AircraftType(type)
#
# ARGS
# type String - {http://www.w3.org/2001/XMLSchema}string
#
# RETURNS
# v_return AircraftTypeStruct - {http://directflight.flightaware.com/soap/DirectFlight}AircraftTypeStruct
#
type = nil
puts obj.aircraftType(type)
# SYNOPSIS
# countAirportOperations(airport)
#
# ARGS
# airport String - {http://www.w3.org/2001/XMLSchema}string
#
# RETURNS
# v_return CountAirportOperationsStruct - {http://directflight.flightaware.com/soap/DirectFlight}countAirportOperationsStruct
#
airport = nil
puts obj.countAirportOperations(airport)
# SYNOPSIS
# blockIdentCheck(ident)
#
# ARGS
# ident String - {http://www.w3.org/2001/XMLSchema}string
#
# RETURNS
# v_return Int - {http://www.w3.org/2001/XMLSchema}int
#
ident = nil
puts obj.blockIdentCheck(ident)
# SYNOPSIS
# METAR(airport)
#
# ARGS
# airport String - {http://www.w3.org/2001/XMLSchema}string
#
# RETURNS
# v_return String - {http://www.w3.org/2001/XMLSchema}string
#
airport = nil
puts obj.mETAR(airport)
# SYNOPSIS
# TAF(airport)
#
# ARGS
# airport String - {http://www.w3.org/2001/XMLSchema}string
#
# RETURNS
# v_return String - {http://www.w3.org/2001/XMLSchema}string
#
airport = nil
puts obj.tAF(airport)
# SYNOPSIS
# NTAF(airport)
#
# ARGS
# airport String - {http://www.w3.org/2001/XMLSchema}string
#
# RETURNS
# v_return TafStruct - {http://directflight.flightaware.com/soap/DirectFlight}TafStruct
#
airport = nil
puts obj.nTAF(airport)
# SYNOPSIS
# LatLongsToDistance(lat1, lon1, lat2, lon2)
#
# ARGS
# lat1 Float - {http://www.w3.org/2001/XMLSchema}float
# lon1 Float - {http://www.w3.org/2001/XMLSchema}float
# lat2 Float - {http://www.w3.org/2001/XMLSchema}float
# lon2 Float - {http://www.w3.org/2001/XMLSchema}float
#
# RETURNS
# v_return Int - {http://www.w3.org/2001/XMLSchema}int
#
lat1 = lon1 = lat2 = lon2 = nil
puts obj.latLongsToDistance(lat1, lon1, lat2, lon2)
# SYNOPSIS
# LatLongsToHeading(lat1, lon1, lat2, lon2)
#
# ARGS
# lat1 Float - {http://www.w3.org/2001/XMLSchema}float
# lon1 Float - {http://www.w3.org/2001/XMLSchema}float
# lat2 Float - {http://www.w3.org/2001/XMLSchema}float
# lon2 Float - {http://www.w3.org/2001/XMLSchema}float
#
# RETURNS
# v_return Int - {http://www.w3.org/2001/XMLSchema}int
#
lat1 = lon1 = lat2 = lon2 = nil
puts obj.latLongsToHeading(lat1, lon1, lat2, lon2)
# SYNOPSIS
# MapFlight_Beta(ident, mapHeight, mapWidth)
#
# ARGS
# ident String - {http://www.w3.org/2001/XMLSchema}string
# mapHeight Int - {http://www.w3.org/2001/XMLSchema}int
# mapWidth Int - {http://www.w3.org/2001/XMLSchema}int
#
# RETURNS
# v_return String - {http://www.w3.org/2001/XMLSchema}string
#
ident = mapHeight = mapWidth = nil
puts obj.mapFlight_Beta(ident, mapHeight, mapWidth)