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/**
19 * Service definition for Pagespeedonline (v5).
20 *
21 * <p>
22 * Analyzes the performance of a web page and provides tailored suggestions to
23 * make that page faster.</p>
24 *
25 * <p>
26 * For more information about this service, see the API
27 * <a href="https://developers.google.com/speed/docs/insights/v5/get-started" target="_blank">Documentation</a>
28 * </p>
29 *
30 * @author Google, Inc.
31 */
32class Google_Service_Pagespeedonline extends Google_Service
33{
34
35
36  public $pagespeedapi;
37
38  /**
39   * Constructs the internal representation of the Pagespeedonline service.
40   *
41   * @param Google_Client $client
42   */
43  public function __construct(Google_Client $client)
44  {
45    parent::__construct($client);
46    $this->rootUrl = 'https://www.googleapis.com/';
47    $this->servicePath = 'pagespeedonline/v5/';
48    $this->batchPath = 'batch/pagespeedonline/v5';
49    $this->version = 'v5';
50    $this->serviceName = 'pagespeedonline';
51
52    $this->pagespeedapi = new Google_Service_Pagespeedonline_Resource_Pagespeedapi(
53        $this,
54        $this->serviceName,
55        'pagespeedapi',
56        array(
57          'methods' => array(
58            'runpagespeed' => array(
59              'path' => 'runPagespeed',
60              'httpMethod' => 'GET',
61              'parameters' => array(
62                'url' => array(
63                  'location' => 'query',
64                  'type' => 'string',
65                  'required' => true,
66                ),
67                'category' => array(
68                  'location' => 'query',
69                  'type' => 'string',
70                  'repeated' => true,
71                ),
72                'locale' => array(
73                  'location' => 'query',
74                  'type' => 'string',
75                ),
76                'strategy' => array(
77                  'location' => 'query',
78                  'type' => 'string',
79                ),
80                'utm_campaign' => array(
81                  'location' => 'query',
82                  'type' => 'string',
83                ),
84                'utm_source' => array(
85                  'location' => 'query',
86                  'type' => 'string',
87                ),
88              ),
89            ),
90          )
91        )
92    );
93  }
94}
95