OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 |
1 library googleapis.pagespeedonline.v1; | 3 library googleapis.pagespeedonline.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 pagespeedonline/v1'; |
15 | 18 |
16 /** | 19 /** |
17 * Lets you analyze the performance of a web page and get tailored suggestions | 20 * Lets you analyze the performance of a web page and get tailored suggestions |
18 * to make that page faster. | 21 * to make that page faster. |
19 */ | 22 */ |
20 class PagespeedonlineApi { | 23 class PagespeedonlineApi { |
21 | 24 |
22 final common_internal.ApiRequester _requester; | 25 final commons.ApiRequester _requester; |
23 | 26 |
24 PagespeedapiResourceApi get pagespeedapi => new PagespeedapiResourceApi(_reque
ster); | 27 PagespeedapiResourceApi get pagespeedapi => new PagespeedapiResourceApi(_reque
ster); |
25 | 28 |
26 PagespeedonlineApi(http.Client client, {core.String rootUrl: "https://www.goog
leapis.com/", core.String servicePath: "pagespeedonline/v1/"}) : | 29 PagespeedonlineApi(http.Client client, {core.String rootUrl: "https://www.goog
leapis.com/", core.String servicePath: "pagespeedonline/v1/"}) : |
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 PagespeedapiResourceApi { | 34 class PagespeedapiResourceApi { |
33 final common_internal.ApiRequester _requester; | 35 final commons.ApiRequester _requester; |
34 | 36 |
35 PagespeedapiResourceApi(common_internal.ApiRequester client) : | 37 PagespeedapiResourceApi(commons.ApiRequester client) : |
36 _requester = client; | 38 _requester = client; |
37 | 39 |
38 /** | 40 /** |
39 * Runs Page Speed analysis on the page at the specified URL, and returns a | 41 * Runs PageSpeed analysis on the page at the specified URL, and returns a |
40 * Page Speed score, a list of suggestions to make that page faster, and other | 42 * PageSpeed score, a list of suggestions to make that page faster, and other |
41 * information. | 43 * information. |
42 * | 44 * |
43 * Request parameters: | 45 * Request parameters: |
44 * | 46 * |
45 * [url] - The URL to fetch and analyze | 47 * [url] - The URL to fetch and analyze |
46 * Value must have pattern "http(s)?://.*". | 48 * Value must have pattern "http(s)?://.*". |
47 * | 49 * |
48 * [filterThirdPartyResources] - Indicates if third party resources should be | 50 * [filterThirdPartyResources] - Indicates if third party resources should be |
49 * filtered out before PageSpeed analysis. | 51 * filtered out before PageSpeed analysis. |
50 * | 52 * |
51 * [locale] - The locale used to localize formatted results | 53 * [locale] - The locale used to localize formatted results |
52 * Value must have pattern "[a-zA-Z]+(_[a-zA-Z]+)?". | 54 * Value must have pattern "[a-zA-Z]+(_[a-zA-Z]+)?". |
53 * | 55 * |
54 * [rule] - A Page Speed rule to run; if none are given, all rules are run | 56 * [rule] - A PageSpeed rule to run; if none are given, all rules are run |
55 * Value must have pattern "[a-zA-Z]+". | 57 * Value must have pattern "[a-zA-Z]+". |
56 * | 58 * |
57 * [screenshot] - Indicates if binary data containing a screenshot should be | 59 * [screenshot] - Indicates if binary data containing a screenshot should be |
58 * included | 60 * included |
59 * | 61 * |
60 * [strategy] - The analysis strategy to use | 62 * [strategy] - The analysis strategy to use |
61 * Possible string values are: | 63 * Possible string values are: |
62 * - "desktop" : Fetch and analyze the URL for desktop browsers | 64 * - "desktop" : Fetch and analyze the URL for desktop browsers |
63 * - "mobile" : Fetch and analyze the URL for mobile devices | 65 * - "mobile" : Fetch and analyze the URL for mobile devices |
64 * | 66 * |
65 * Completes with a [Result]. | 67 * Completes with a [Result]. |
66 * | 68 * |
67 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 69 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
68 * error. | 70 * error. |
69 * | 71 * |
70 * If the used [http.Client] completes with an error when making a REST call, | 72 * If the used [http.Client] completes with an error when making a REST call, |
71 * this method will complete with the same error. | 73 * this method will complete with the same error. |
72 */ | 74 */ |
73 async.Future<Result> runpagespeed(core.String url, {core.bool filterThirdParty
Resources, core.String locale, core.List<core.String> rule, core.bool screenshot
, core.String strategy}) { | 75 async.Future<Result> runpagespeed(core.String url, {core.bool filterThirdParty
Resources, core.String locale, core.List<core.String> rule, core.bool screenshot
, core.String strategy}) { |
74 var _url = null; | 76 var _url = null; |
75 var _queryParams = new core.Map(); | 77 var _queryParams = new core.Map(); |
76 var _uploadMedia = null; | 78 var _uploadMedia = null; |
77 var _uploadOptions = null; | 79 var _uploadOptions = null; |
78 var _downloadOptions = common.DownloadOptions.Metadata; | 80 var _downloadOptions = commons.DownloadOptions.Metadata; |
79 var _body = null; | 81 var _body = null; |
80 | 82 |
81 if (url == null) { | 83 if (url == null) { |
82 throw new core.ArgumentError("Parameter url is required."); | 84 throw new core.ArgumentError("Parameter url is required."); |
83 } | 85 } |
84 _queryParams["url"] = [url]; | 86 _queryParams["url"] = [url]; |
85 if (filterThirdPartyResources != null) { | 87 if (filterThirdPartyResources != null) { |
86 _queryParams["filter_third_party_resources"] = ["${filterThirdPartyResourc
es}"]; | 88 _queryParams["filter_third_party_resources"] = ["${filterThirdPartyResourc
es}"]; |
87 } | 89 } |
88 if (locale != null) { | 90 if (locale != null) { |
(...skipping 19 matching lines...) Expand all Loading... |
108 uploadOptions: _uploadOptions, | 110 uploadOptions: _uploadOptions, |
109 uploadMedia: _uploadMedia, | 111 uploadMedia: _uploadMedia, |
110 downloadOptions: _downloadOptions); | 112 downloadOptions: _downloadOptions); |
111 return _response.then((data) => new Result.fromJson(data)); | 113 return _response.then((data) => new Result.fromJson(data)); |
112 } | 114 } |
113 | 115 |
114 } | 116 } |
115 | 117 |
116 | 118 |
117 | 119 |
118 /** Not documented yet. */ | |
119 class ResultFormattedResultsRuleResultsValueUrlBlocksHeaderArgs { | 120 class ResultFormattedResultsRuleResultsValueUrlBlocksHeaderArgs { |
120 /** | 121 /** |
121 * Type of argument. One of URL, STRING_LITERAL, INT_LITERAL, BYTES, or | 122 * Type of argument. One of URL, STRING_LITERAL, INT_LITERAL, BYTES, or |
122 * DURATION. | 123 * DURATION. |
123 */ | 124 */ |
124 core.String type; | 125 core.String type; |
125 | 126 |
126 /** Argument value, as a localized string. */ | 127 /** Argument value, as a localized string. */ |
127 core.String value; | 128 core.String value; |
128 | 129 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 _json["args"] = args.map((value) => (value).toJson()).toList(); | 182 _json["args"] = args.map((value) => (value).toJson()).toList(); |
182 } | 183 } |
183 if (format != null) { | 184 if (format != null) { |
184 _json["format"] = format; | 185 _json["format"] = format; |
185 } | 186 } |
186 return _json; | 187 return _json; |
187 } | 188 } |
188 } | 189 } |
189 | 190 |
190 | 191 |
191 /** Not documented yet. */ | |
192 class ResultFormattedResultsRuleResultsValueUrlBlocksUrlsDetailsArgs { | 192 class ResultFormattedResultsRuleResultsValueUrlBlocksUrlsDetailsArgs { |
193 /** | 193 /** |
194 * Type of argument. One of URL, STRING_LITERAL, INT_LITERAL, BYTES, or | 194 * Type of argument. One of URL, STRING_LITERAL, INT_LITERAL, BYTES, or |
195 * DURATION. | 195 * DURATION. |
196 */ | 196 */ |
197 core.String type; | 197 core.String type; |
198 | 198 |
199 /** Argument value, as a localized string. */ | 199 /** Argument value, as a localized string. */ |
200 core.String value; | 200 core.String value; |
201 | 201 |
(...skipping 15 matching lines...) Expand all Loading... |
217 _json["type"] = type; | 217 _json["type"] = type; |
218 } | 218 } |
219 if (value != null) { | 219 if (value != null) { |
220 _json["value"] = value; | 220 _json["value"] = value; |
221 } | 221 } |
222 return _json; | 222 return _json; |
223 } | 223 } |
224 } | 224 } |
225 | 225 |
226 | 226 |
227 /** Not documented yet. */ | |
228 class ResultFormattedResultsRuleResultsValueUrlBlocksUrlsDetails { | 227 class ResultFormattedResultsRuleResultsValueUrlBlocksUrlsDetails { |
229 /** List of arguments for the format string. */ | 228 /** List of arguments for the format string. */ |
230 core.List<ResultFormattedResultsRuleResultsValueUrlBlocksUrlsDetailsArgs> args
; | 229 core.List<ResultFormattedResultsRuleResultsValueUrlBlocksUrlsDetailsArgs> args
; |
231 | 230 |
232 /** | 231 /** |
233 * A localized format string with $N placeholders, where N is the 1-indexed | 232 * A localized format string with $N placeholders, where N is the 1-indexed |
234 * argument number, e.g. 'Unnecessary metadata for this resource adds an | 233 * argument number, e.g. 'Unnecessary metadata for this resource adds an |
235 * additional $1 bytes to its download size'. | 234 * additional $1 bytes to its download size'. |
236 */ | 235 */ |
237 core.String format; | 236 core.String format; |
(...skipping 16 matching lines...) Expand all Loading... |
254 _json["args"] = args.map((value) => (value).toJson()).toList(); | 253 _json["args"] = args.map((value) => (value).toJson()).toList(); |
255 } | 254 } |
256 if (format != null) { | 255 if (format != null) { |
257 _json["format"] = format; | 256 _json["format"] = format; |
258 } | 257 } |
259 return _json; | 258 return _json; |
260 } | 259 } |
261 } | 260 } |
262 | 261 |
263 | 262 |
264 /** Not documented yet. */ | |
265 class ResultFormattedResultsRuleResultsValueUrlBlocksUrlsResultArgs { | 263 class ResultFormattedResultsRuleResultsValueUrlBlocksUrlsResultArgs { |
266 /** | 264 /** |
267 * Type of argument. One of URL, STRING_LITERAL, INT_LITERAL, BYTES, or | 265 * Type of argument. One of URL, STRING_LITERAL, INT_LITERAL, BYTES, or |
268 * DURATION. | 266 * DURATION. |
269 */ | 267 */ |
270 core.String type; | 268 core.String type; |
271 | 269 |
272 /** Argument value, as a localized string. */ | 270 /** Argument value, as a localized string. */ |
273 core.String value; | 271 core.String value; |
274 | 272 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 _json["args"] = args.map((value) => (value).toJson()).toList(); | 327 _json["args"] = args.map((value) => (value).toJson()).toList(); |
330 } | 328 } |
331 if (format != null) { | 329 if (format != null) { |
332 _json["format"] = format; | 330 _json["format"] = format; |
333 } | 331 } |
334 return _json; | 332 return _json; |
335 } | 333 } |
336 } | 334 } |
337 | 335 |
338 | 336 |
339 /** Not documented yet. */ | |
340 class ResultFormattedResultsRuleResultsValueUrlBlocksUrls { | 337 class ResultFormattedResultsRuleResultsValueUrlBlocksUrls { |
341 /** | 338 /** |
342 * List of entries that provide additional details about a single URL. | 339 * List of entries that provide additional details about a single URL. |
343 * Optional. | 340 * Optional. |
344 */ | 341 */ |
345 core.List<ResultFormattedResultsRuleResultsValueUrlBlocksUrlsDetails> details; | 342 core.List<ResultFormattedResultsRuleResultsValueUrlBlocksUrlsDetails> details; |
346 | 343 |
347 /** | 344 /** |
348 * A format string that gives information about the URL, and a list of | 345 * A format string that gives information about the URL, and a list of |
349 * arguments for that format string. | 346 * arguments for that format string. |
(...skipping 18 matching lines...) Expand all Loading... |
368 _json["details"] = details.map((value) => (value).toJson()).toList(); | 365 _json["details"] = details.map((value) => (value).toJson()).toList(); |
369 } | 366 } |
370 if (result != null) { | 367 if (result != null) { |
371 _json["result"] = (result).toJson(); | 368 _json["result"] = (result).toJson(); |
372 } | 369 } |
373 return _json; | 370 return _json; |
374 } | 371 } |
375 } | 372 } |
376 | 373 |
377 | 374 |
378 /** Not documented yet. */ | |
379 class ResultFormattedResultsRuleResultsValueUrlBlocks { | 375 class ResultFormattedResultsRuleResultsValueUrlBlocks { |
380 /** Heading to be displayed with the list of URLs. */ | 376 /** Heading to be displayed with the list of URLs. */ |
381 ResultFormattedResultsRuleResultsValueUrlBlocksHeader header; | 377 ResultFormattedResultsRuleResultsValueUrlBlocksHeader header; |
382 | 378 |
383 /** | 379 /** |
384 * List of entries that provide information about URLs in the url block. | 380 * List of entries that provide information about URLs in the url block. |
385 * Optional. | 381 * Optional. |
386 */ | 382 */ |
387 core.List<ResultFormattedResultsRuleResultsValueUrlBlocksUrls> urls; | 383 core.List<ResultFormattedResultsRuleResultsValueUrlBlocksUrls> urls; |
388 | 384 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 } | 457 } |
462 if (urlBlocks != null) { | 458 if (urlBlocks != null) { |
463 _json["urlBlocks"] = urlBlocks.map((value) => (value).toJson()).toList(); | 459 _json["urlBlocks"] = urlBlocks.map((value) => (value).toJson()).toList(); |
464 } | 460 } |
465 return _json; | 461 return _json; |
466 } | 462 } |
467 } | 463 } |
468 | 464 |
469 | 465 |
470 /** | 466 /** |
471 * Localized Page Speed results. Contains a ruleResults entry for each Page | 467 * Localized PageSpeed results. Contains a ruleResults entry for each PageSpeed |
472 * Speed rule instantiated and run by the server. | 468 * rule instantiated and run by the server. |
473 */ | 469 */ |
474 class ResultFormattedResults { | 470 class ResultFormattedResults { |
475 /** The locale of the formattedResults, e.g. "en_US". */ | 471 /** The locale of the formattedResults, e.g. "en_US". */ |
476 core.String locale; | 472 core.String locale; |
477 | 473 |
478 /** | 474 /** |
479 * Dictionary of formatted rule results, with one entry for each Page Speed | 475 * Dictionary of formatted rule results, with one entry for each PageSpeed |
480 * rule instantiated and run by the server. | 476 * rule instantiated and run by the server. |
481 */ | 477 */ |
482 core.Map<core.String, ResultFormattedResultsRuleResultsValue> ruleResults; | 478 core.Map<core.String, ResultFormattedResultsRuleResultsValue> ruleResults; |
483 | 479 |
484 | 480 |
485 ResultFormattedResults(); | 481 ResultFormattedResults(); |
486 | 482 |
487 ResultFormattedResults.fromJson(core.Map _json) { | 483 ResultFormattedResults.fromJson(core.Map _json) { |
488 if (_json.containsKey("locale")) { | 484 if (_json.containsKey("locale")) { |
489 locale = _json["locale"]; | 485 locale = _json["locale"]; |
490 } | 486 } |
491 if (_json.containsKey("ruleResults")) { | 487 if (_json.containsKey("ruleResults")) { |
492 ruleResults = common_internal.mapMap(_json["ruleResults"], (item) => new R
esultFormattedResultsRuleResultsValue.fromJson(item)); | 488 ruleResults = commons.mapMap(_json["ruleResults"], (item) => new ResultFor
mattedResultsRuleResultsValue.fromJson(item)); |
493 } | 489 } |
494 } | 490 } |
495 | 491 |
496 core.Map toJson() { | 492 core.Map toJson() { |
497 var _json = new core.Map(); | 493 var _json = new core.Map(); |
498 if (locale != null) { | 494 if (locale != null) { |
499 _json["locale"] = locale; | 495 _json["locale"] = locale; |
500 } | 496 } |
501 if (ruleResults != null) { | 497 if (ruleResults != null) { |
502 _json["ruleResults"] = common_internal.mapMap(ruleResults, (item) => (item
).toJson()); | 498 _json["ruleResults"] = commons.mapMap(ruleResults, (item) => (item).toJson
()); |
503 } | 499 } |
504 return _json; | 500 return _json; |
505 } | 501 } |
506 } | 502 } |
507 | 503 |
508 | 504 |
509 /** | 505 /** |
510 * Summary statistics for the page, such as number of JavaScript bytes, number | 506 * Summary statistics for the page, such as number of JavaScript bytes, number |
511 * of HTML bytes, etc. | 507 * of HTML bytes, etc. |
512 */ | 508 */ |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 _json["textResponseBytes"] = textResponseBytes; | 636 _json["textResponseBytes"] = textResponseBytes; |
641 } | 637 } |
642 if (totalRequestBytes != null) { | 638 if (totalRequestBytes != null) { |
643 _json["totalRequestBytes"] = totalRequestBytes; | 639 _json["totalRequestBytes"] = totalRequestBytes; |
644 } | 640 } |
645 return _json; | 641 return _json; |
646 } | 642 } |
647 } | 643 } |
648 | 644 |
649 | 645 |
650 /** Base64 encoded screenshot of the page that was analyzed. */ | 646 /** Base64-encoded screenshot of the page that was analyzed. */ |
651 class ResultScreenshot { | 647 class ResultScreenshot { |
652 /** Image data base64 encoded. */ | 648 /** Image data base64 encoded. */ |
653 core.String data; | 649 core.String data; |
654 | 650 |
655 core.List<core.int> get dataAsBytes { | 651 core.List<core.int> get dataAsBytes { |
656 return crypto.CryptoUtils.base64StringToBytes(data); | 652 return crypto.CryptoUtils.base64StringToBytes(data); |
657 } | 653 } |
658 | 654 |
659 void set dataAsBytes(core.List<core.int> _bytes) { | 655 void set dataAsBytes(core.List<core.int> _bytes) { |
660 data = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); | 656 data = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 _json["mime_type"] = mimeType; | 695 _json["mime_type"] = mimeType; |
700 } | 696 } |
701 if (width != null) { | 697 if (width != null) { |
702 _json["width"] = width; | 698 _json["width"] = width; |
703 } | 699 } |
704 return _json; | 700 return _json; |
705 } | 701 } |
706 } | 702 } |
707 | 703 |
708 | 704 |
709 /** The version of the Page Speed SDK used to generate these results. */ | 705 /** The version of PageSpeed used to generate these results. */ |
710 class ResultVersion { | 706 class ResultVersion { |
711 /** | 707 /** The major version number of PageSpeed used to generate these results. */ |
712 * The major version number of the Page Speed SDK used to generate these | |
713 * results. | |
714 */ | |
715 core.int major; | 708 core.int major; |
716 | 709 |
717 /** | 710 /** The minor version number of PageSpeed used to generate these results. */ |
718 * The minor version number of the Page Speed SDK used to generate these | |
719 * results. | |
720 */ | |
721 core.int minor; | 711 core.int minor; |
722 | 712 |
723 | 713 |
724 ResultVersion(); | 714 ResultVersion(); |
725 | 715 |
726 ResultVersion.fromJson(core.Map _json) { | 716 ResultVersion.fromJson(core.Map _json) { |
727 if (_json.containsKey("major")) { | 717 if (_json.containsKey("major")) { |
728 major = _json["major"]; | 718 major = _json["major"]; |
729 } | 719 } |
730 if (_json.containsKey("minor")) { | 720 if (_json.containsKey("minor")) { |
731 minor = _json["minor"]; | 721 minor = _json["minor"]; |
732 } | 722 } |
733 } | 723 } |
734 | 724 |
735 core.Map toJson() { | 725 core.Map toJson() { |
736 var _json = new core.Map(); | 726 var _json = new core.Map(); |
737 if (major != null) { | 727 if (major != null) { |
738 _json["major"] = major; | 728 _json["major"] = major; |
739 } | 729 } |
740 if (minor != null) { | 730 if (minor != null) { |
741 _json["minor"] = minor; | 731 _json["minor"] = minor; |
742 } | 732 } |
743 return _json; | 733 return _json; |
744 } | 734 } |
745 } | 735 } |
746 | 736 |
747 | 737 |
748 /** Not documented yet. */ | |
749 class Result { | 738 class Result { |
750 /** | 739 /** |
751 * Localized Page Speed results. Contains a ruleResults entry for each Page | 740 * Localized PageSpeed results. Contains a ruleResults entry for each |
752 * Speed rule instantiated and run by the server. | 741 * PageSpeed rule instantiated and run by the server. |
753 */ | 742 */ |
754 ResultFormattedResults formattedResults; | 743 ResultFormattedResults formattedResults; |
755 | 744 |
756 /** | 745 /** |
757 * Canonicalized and final URL for the document, after following page | 746 * Canonicalized and final URL for the document, after following page |
758 * redirects (if any). | 747 * redirects (if any). |
759 */ | 748 */ |
760 core.String id; | 749 core.String id; |
761 | 750 |
762 /** | 751 /** |
(...skipping 11 matching lines...) Expand all Loading... |
774 */ | 763 */ |
775 ResultPageStats pageStats; | 764 ResultPageStats pageStats; |
776 | 765 |
777 /** | 766 /** |
778 * Response code for the document. 200 indicates a normal page load. 4xx/5xx | 767 * Response code for the document. 200 indicates a normal page load. 4xx/5xx |
779 * indicates an error. | 768 * indicates an error. |
780 */ | 769 */ |
781 core.int responseCode; | 770 core.int responseCode; |
782 | 771 |
783 /** | 772 /** |
784 * The Page Speed Score (0-100), which indicates how much faster a page could | 773 * The PageSpeed Score (0-100), which indicates how much faster a page could |
785 * be. A high score indicates little room for improvement, while a lower score | 774 * be. A high score indicates little room for improvement, while a lower score |
786 * indicates more room for improvement. | 775 * indicates more room for improvement. |
787 */ | 776 */ |
788 core.int score; | 777 core.int score; |
789 | 778 |
790 /** Base64 encoded screenshot of the page that was analyzed. */ | 779 /** Base64-encoded screenshot of the page that was analyzed. */ |
791 ResultScreenshot screenshot; | 780 ResultScreenshot screenshot; |
792 | 781 |
793 /** Title of the page, as displayed in the browser's title bar. */ | 782 /** Title of the page, as displayed in the browser's title bar. */ |
794 core.String title; | 783 core.String title; |
795 | 784 |
796 /** The version of the Page Speed SDK used to generate these results. */ | 785 /** The version of PageSpeed used to generate these results. */ |
797 ResultVersion version; | 786 ResultVersion version; |
798 | 787 |
799 | 788 |
800 Result(); | 789 Result(); |
801 | 790 |
802 Result.fromJson(core.Map _json) { | 791 Result.fromJson(core.Map _json) { |
803 if (_json.containsKey("formattedResults")) { | 792 if (_json.containsKey("formattedResults")) { |
804 formattedResults = new ResultFormattedResults.fromJson(_json["formattedRes
ults"]); | 793 formattedResults = new ResultFormattedResults.fromJson(_json["formattedRes
ults"]); |
805 } | 794 } |
806 if (_json.containsKey("id")) { | 795 if (_json.containsKey("id")) { |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
860 } | 849 } |
861 if (title != null) { | 850 if (title != null) { |
862 _json["title"] = title; | 851 _json["title"] = title; |
863 } | 852 } |
864 if (version != null) { | 853 if (version != null) { |
865 _json["version"] = (version).toJson(); | 854 _json["version"] = (version).toJson(); |
866 } | 855 } |
867 return _json; | 856 return _json; |
868 } | 857 } |
869 } | 858 } |
870 | |
871 | |
OLD | NEW |