OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 |
1 library googleapis.qpxExpress.v1; | 3 library googleapis.qpxExpress.v1; |
2 | 4 |
3 import "dart:core" as core; | 5 import 'dart:core' as core; |
4 import "dart:collection" as collection; | 6 import 'dart:collection' as collection; |
5 import "dart:async" as async; | 7 import 'dart:async' as async; |
6 import "dart:convert" as convert; | 8 import 'dart:convert' as convert; |
7 | 9 |
8 import "package:crypto/crypto.dart" as crypto; | 10 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 11 import 'package:crypto/crypto.dart' as crypto; |
9 import 'package:http/http.dart' as http; | 12 import 'package:http/http.dart' as http; |
10 import '../src/common_internal.dart' as common_internal; | |
11 import '../common/common.dart' as common; | |
12 | 13 |
13 export '../common/common.dart' show ApiRequestError; | 14 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
14 export '../common/common.dart' show DetailedApiRequestError; | 15 ApiRequestError, DetailedApiRequestError; |
| 16 |
| 17 const core.String USER_AGENT = 'dart-api-client qpxExpress/v1'; |
15 | 18 |
16 /** | 19 /** |
17 * Lets you find the least expensive flights between an origin and a | 20 * Lets you find the least expensive flights between an origin and a |
18 * destination. | 21 * destination. |
19 */ | 22 */ |
20 class QpxExpressApi { | 23 class QpxExpressApi { |
21 | 24 |
22 final common_internal.ApiRequester _requester; | 25 final commons.ApiRequester _requester; |
23 | 26 |
24 TripsResourceApi get trips => new TripsResourceApi(_requester); | 27 TripsResourceApi get trips => new TripsResourceApi(_requester); |
25 | 28 |
26 QpxExpressApi(http.Client client, {core.String rootUrl: "https://www.googleapi
s.com/", core.String servicePath: "qpxExpress/v1/trips/"}) : | 29 QpxExpressApi(http.Client client, {core.String rootUrl: "https://www.googleapi
s.com/", core.String servicePath: "qpxExpress/v1/trips/"}) : |
27 _requester = new common_internal.ApiRequester(client, rootUrl, servicePath
); | 30 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
28 } | 31 } |
29 | 32 |
30 | 33 |
31 /** Not documented yet. */ | |
32 class TripsResourceApi { | 34 class TripsResourceApi { |
33 final common_internal.ApiRequester _requester; | 35 final commons.ApiRequester _requester; |
34 | 36 |
35 TripsResourceApi(common_internal.ApiRequester client) : | 37 TripsResourceApi(commons.ApiRequester client) : |
36 _requester = client; | 38 _requester = client; |
37 | 39 |
38 /** | 40 /** |
39 * Returns a list of flights. | 41 * Returns a list of flights. |
40 * | 42 * |
41 * [request] - The metadata request object. | 43 * [request] - The metadata request object. |
42 * | 44 * |
43 * Request parameters: | 45 * Request parameters: |
44 * | 46 * |
45 * Completes with a [TripsSearchResponse]. | 47 * Completes with a [TripsSearchResponse]. |
46 * | 48 * |
47 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 49 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
48 * error. | 50 * error. |
49 * | 51 * |
50 * If the used [http.Client] completes with an error when making a REST call, | 52 * If the used [http.Client] completes with an error when making a REST call, |
51 * this method will complete with the same error. | 53 * this method will complete with the same error. |
52 */ | 54 */ |
53 async.Future<TripsSearchResponse> search(TripsSearchRequest request) { | 55 async.Future<TripsSearchResponse> search(TripsSearchRequest request) { |
54 var _url = null; | 56 var _url = null; |
55 var _queryParams = new core.Map(); | 57 var _queryParams = new core.Map(); |
56 var _uploadMedia = null; | 58 var _uploadMedia = null; |
57 var _uploadOptions = null; | 59 var _uploadOptions = null; |
58 var _downloadOptions = common.DownloadOptions.Metadata; | 60 var _downloadOptions = commons.DownloadOptions.Metadata; |
59 var _body = null; | 61 var _body = null; |
60 | 62 |
61 if (request != null) { | 63 if (request != null) { |
62 _body = convert.JSON.encode((request).toJson()); | 64 _body = convert.JSON.encode((request).toJson()); |
63 } | 65 } |
64 | 66 |
65 | 67 |
66 _url = 'search'; | 68 _url = 'search'; |
67 | 69 |
68 var _response = _requester.request(_url, | 70 var _response = _requester.request(_url, |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 | 442 |
441 | 443 |
442 /** | 444 /** |
443 * Complete information about a fare used in the solution to a low-fare search | 445 * Complete information about a fare used in the solution to a low-fare search |
444 * query. In the airline industry a fare is a price an airline charges for | 446 * query. In the airline industry a fare is a price an airline charges for |
445 * one-way travel between two points. A fare typically contains a carrier code, | 447 * one-way travel between two points. A fare typically contains a carrier code, |
446 * two city codes, a price, and a fare basis. (A fare basis is a one-to-eight | 448 * two city codes, a price, and a fare basis. (A fare basis is a one-to-eight |
447 * character alphanumeric code used to identify a fare.) | 449 * character alphanumeric code used to identify a fare.) |
448 */ | 450 */ |
449 class FareInfo { | 451 class FareInfo { |
450 /** Not documented yet. */ | |
451 core.String basisCode; | 452 core.String basisCode; |
452 | 453 |
453 /** | 454 /** |
454 * The carrier of the aircraft or other vehicle commuting between two points. | 455 * The carrier of the aircraft or other vehicle commuting between two points. |
455 */ | 456 */ |
456 core.String carrier; | 457 core.String carrier; |
457 | 458 |
458 /** The city code of the city the trip ends at. */ | 459 /** The city code of the city the trip ends at. */ |
459 core.String destination; | 460 core.String destination; |
460 | 461 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 /** | 535 /** |
535 * A flight is a sequence of legs with the same airline carrier and flight | 536 * A flight is a sequence of legs with the same airline carrier and flight |
536 * number. (A leg is the smallest unit of travel, in the case of a flight a | 537 * number. (A leg is the smallest unit of travel, in the case of a flight a |
537 * takeoff immediately followed by a landing at two set points on a particular | 538 * takeoff immediately followed by a landing at two set points on a particular |
538 * carrier with a particular flight number.) The naive view is that a flight is | 539 * carrier with a particular flight number.) The naive view is that a flight is |
539 * scheduled travel of an aircraft between two points, with possibly | 540 * scheduled travel of an aircraft between two points, with possibly |
540 * intermediate stops, but carriers will frequently list flights that require a | 541 * intermediate stops, but carriers will frequently list flights that require a |
541 * change of aircraft between legs. | 542 * change of aircraft between legs. |
542 */ | 543 */ |
543 class FlightInfo { | 544 class FlightInfo { |
544 /** Not documented yet. */ | |
545 core.String carrier; | 545 core.String carrier; |
546 | 546 |
547 /** The flight number. */ | 547 /** The flight number. */ |
548 core.String number; | 548 core.String number; |
549 | 549 |
550 | 550 |
551 FlightInfo(); | 551 FlightInfo(); |
552 | 552 |
553 FlightInfo.fromJson(core.Map _json) { | 553 FlightInfo.fromJson(core.Map _json) { |
554 if (_json.containsKey("carrier")) { | 554 if (_json.containsKey("carrier")) { |
(...skipping 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1892 var _json = new core.Map(); | 1892 var _json = new core.Map(); |
1893 if (kind != null) { | 1893 if (kind != null) { |
1894 _json["kind"] = kind; | 1894 _json["kind"] = kind; |
1895 } | 1895 } |
1896 if (trips != null) { | 1896 if (trips != null) { |
1897 _json["trips"] = (trips).toJson(); | 1897 _json["trips"] = (trips).toJson(); |
1898 } | 1898 } |
1899 return _json; | 1899 return _json; |
1900 } | 1900 } |
1901 } | 1901 } |
1902 | |
1903 | |
OLD | NEW |