暂无描述

Pagespeedonline.php 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <?php
  2. /*
  3. * Copyright 2014 Google Inc.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  6. * use this file except in compliance with the License. You may obtain a copy of
  7. * the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  13. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  14. * License for the specific language governing permissions and limitations under
  15. * the License.
  16. */
  17. /**
  18. * Service definition for Pagespeedonline (v4).
  19. *
  20. * <p>
  21. * Analyzes the performance of a web page and provides tailored suggestions to
  22. * make that page faster.</p>
  23. *
  24. * <p>
  25. * For more information about this service, see the API
  26. * <a href="https://developers.google.com/speed/docs/insights/v4/getting-started" target="_blank">Documentation</a>
  27. * </p>
  28. *
  29. * @author Google, Inc.
  30. */
  31. class Google_Service_Pagespeedonline extends Google_Service
  32. {
  33. public $pagespeedapi;
  34. /**
  35. * Constructs the internal representation of the Pagespeedonline service.
  36. *
  37. * @param Google_Client $client
  38. */
  39. public function __construct(Google_Client $client)
  40. {
  41. parent::__construct($client);
  42. $this->rootUrl = 'https://www.googleapis.com/';
  43. $this->servicePath = 'pagespeedonline/v4/';
  44. $this->version = 'v4';
  45. $this->serviceName = 'pagespeedonline';
  46. $this->pagespeedapi = new Google_Service_Pagespeedonline_Resource_Pagespeedapi(
  47. $this,
  48. $this->serviceName,
  49. 'pagespeedapi',
  50. array(
  51. 'methods' => array(
  52. 'runpagespeed' => array(
  53. 'path' => 'runPagespeed',
  54. 'httpMethod' => 'GET',
  55. 'parameters' => array(
  56. 'url' => array(
  57. 'location' => 'query',
  58. 'type' => 'string',
  59. 'required' => true,
  60. ),
  61. 'filter_third_party_resources' => array(
  62. 'location' => 'query',
  63. 'type' => 'boolean',
  64. ),
  65. 'locale' => array(
  66. 'location' => 'query',
  67. 'type' => 'string',
  68. ),
  69. 'rule' => array(
  70. 'location' => 'query',
  71. 'type' => 'string',
  72. 'repeated' => true,
  73. ),
  74. 'screenshot' => array(
  75. 'location' => 'query',
  76. 'type' => 'boolean',
  77. ),
  78. 'snapshots' => array(
  79. 'location' => 'query',
  80. 'type' => 'boolean',
  81. ),
  82. 'strategy' => array(
  83. 'location' => 'query',
  84. 'type' => 'string',
  85. ),
  86. 'utm_campaign' => array(
  87. 'location' => 'query',
  88. 'type' => 'string',
  89. ),
  90. 'utm_source' => array(
  91. 'location' => 'query',
  92. 'type' => 'string',
  93. ),
  94. ),
  95. ),
  96. )
  97. )
  98. );
  99. }
  100. }