| OLD | NEW |
| 1 library googleapis.translate.v2; | 1 library googleapis.translate.v2; |
| 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 /** Lets you translate text from one language to another */ | 16 /** Lets you translate text from one language to another */ |
| 17 class TranslateApi { | 17 class TranslateApi { |
| 18 | 18 |
| 19 final common_internal.ApiRequester _requester; | 19 final common_internal.ApiRequester _requester; |
| 20 | 20 |
| 21 DetectionsResourceApi get detections => new DetectionsResourceApi(_requester); | 21 DetectionsResourceApi get detections => new DetectionsResourceApi(_requester); |
| 22 LanguagesResourceApi get languages => new LanguagesResourceApi(_requester); | 22 LanguagesResourceApi get languages => new LanguagesResourceApi(_requester); |
| 23 TranslationsResourceApi get translations => new TranslationsResourceApi(_reque
ster); | 23 TranslationsResourceApi get translations => new TranslationsResourceApi(_reque
ster); |
| 24 | 24 |
| 25 TranslateApi(http.Client client) : | 25 TranslateApi(http.Client client, {core.String rootUrl: "https://www.googleapis
.com/", core.String servicePath: "language/translate/"}) : |
| 26 _requester = new common_internal.ApiRequester(client, "https://www.googlea
pis.com/", "language/translate/"); | 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 DetectionsResourceApi { | 31 class DetectionsResourceApi { |
| 32 final common_internal.ApiRequester _requester; | 32 final common_internal.ApiRequester _requester; |
| 33 | 33 |
| 34 DetectionsResourceApi(common_internal.ApiRequester client) : | 34 DetectionsResourceApi(common_internal.ApiRequester client) : |
| 35 _requester = client; | 35 _requester = client; |
| 36 | 36 |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 _json["detectedSourceLanguage"] = detectedSourceLanguage; | 414 _json["detectedSourceLanguage"] = detectedSourceLanguage; |
| 415 } | 415 } |
| 416 if (translatedText != null) { | 416 if (translatedText != null) { |
| 417 _json["translatedText"] = translatedText; | 417 _json["translatedText"] = translatedText; |
| 418 } | 418 } |
| 419 return _json; | 419 return _json; |
| 420 } | 420 } |
| 421 } | 421 } |
| 422 | 422 |
| 423 | 423 |
| OLD | NEW |