OLD | NEW |
1 library googleapis.civicinfo.v1; | 1 library googleapis.civicinfo.v1; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
5 import "dart:async" as async; | 5 import "dart:async" as async; |
6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
7 | 7 |
8 import "package:crypto/crypto.dart" as crypto; | 8 import "package:crypto/crypto.dart" as crypto; |
9 import 'package:http/http.dart' as http; | 9 import 'package:http/http.dart' as http; |
10 import '../src/common_internal.dart' as common_internal; | 10 import '../src/common_internal.dart' as common_internal; |
11 import '../common/common.dart' as common; | 11 import '../common/common.dart' as common; |
12 | 12 |
13 export '../common/common.dart' show ApiRequestError; | 13 export '../common/common.dart' show ApiRequestError; |
14 export '../common/common.dart' show DetailedApiRequestError; | 14 export '../common/common.dart' show DetailedApiRequestError; |
15 | 15 |
16 /** An API for accessing civic information. */ | 16 /** An API for accessing civic information. */ |
17 class CivicinfoApi { | 17 class CivicinfoApi { |
18 | 18 |
19 final common_internal.ApiRequester _requester; | 19 final common_internal.ApiRequester _requester; |
20 | 20 |
21 DivisionsResourceApi get divisions => new DivisionsResourceApi(_requester); | 21 DivisionsResourceApi get divisions => new DivisionsResourceApi(_requester); |
22 ElectionsResourceApi get elections => new ElectionsResourceApi(_requester); | 22 ElectionsResourceApi get elections => new ElectionsResourceApi(_requester); |
23 RepresentativesResourceApi get representatives => new RepresentativesResourceA
pi(_requester); | 23 RepresentativesResourceApi get representatives => new RepresentativesResourceA
pi(_requester); |
24 | 24 |
25 CivicinfoApi(http.Client client) : | 25 CivicinfoApi(http.Client client, {core.String rootUrl: "https://www.googleapis
.com/", core.String servicePath: "civicinfo/v1/"}) : |
26 _requester = new common_internal.ApiRequester(client, "https://www.googlea
pis.com/", "civicinfo/v1/"); | 26 _requester = new common_internal.ApiRequester(client, rootUrl, servicePath
); |
27 } | 27 } |
28 | 28 |
29 | 29 |
30 /** Not documented yet. */ | 30 /** Not documented yet. */ |
31 class DivisionsResourceApi { | 31 class DivisionsResourceApi { |
32 final common_internal.ApiRequester _requester; | 32 final common_internal.ApiRequester _requester; |
33 | 33 |
34 DivisionsResourceApi(common_internal.ApiRequester client) : | 34 DivisionsResourceApi(common_internal.ApiRequester client) : |
35 _requester = client; | 35 _requester = client; |
36 | 36 |
(...skipping 1759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1796 _json["state"] = state.map((value) => (value).toJson()).toList(); | 1796 _json["state"] = state.map((value) => (value).toJson()).toList(); |
1797 } | 1797 } |
1798 if (status != null) { | 1798 if (status != null) { |
1799 _json["status"] = status; | 1799 _json["status"] = status; |
1800 } | 1800 } |
1801 return _json; | 1801 return _json; |
1802 } | 1802 } |
1803 } | 1803 } |
1804 | 1804 |
1805 | 1805 |
OLD | NEW |