Changeset 859:1e789c934953 for src/mlx/web.py
- Timestamp:
- 06/18/17 11:17:51 (7 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/web.py
r858 r859 1362 1362 #------------------------------------------------------------------------------ 1363 1363 1364 class BookFlights(RPCRequest): 1365 """Request to book flights.""" 1366 def __init__(self, client, callback, flightIDs, date, tailNumber): 1367 """Construct the request with the given client and callback function.""" 1368 super(BookFlights, self).__init__(client, callback) 1369 self._flightIDs = flightIDs 1370 self._date = date 1371 self._tailNumber = tailNumber 1372 1373 def run(self): 1374 """Perform the login request.""" 1375 result = Result() 1376 1377 result.bookedFlights = self._client.bookFlights(self._flightIDs, 1378 self._date, 1379 self._tailNumber) 1380 1381 return result 1382 1383 #------------------------------------------------------------------------------ 1384 1364 1385 class Handler(threading.Thread): 1365 1386 """The handler for the web services. … … 1463 1484 self._addRequest(GetTimetable(self._rpcClient, callback, date, types)) 1464 1485 1486 def bookFlights(self, callback, flightIDs, date, tailNumber): 1487 """Enqueue a request to book some flights.""" 1488 self._addRequest(BookFlights(self._rpcClient, callback, 1489 flightIDs, date, tailNumber)) 1490 1465 1491 def run(self): 1466 1492 """Process the requests."""
Note:
See TracChangeset
for help on using the changeset viewer.