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 | namespace Google\Service;
|
---|
19 |
|
---|
20 | use Google\Client;
|
---|
21 |
|
---|
22 | /**
|
---|
23 | * Service definition for Localservices (v1).
|
---|
24 | *
|
---|
25 | * <p>
|
---|
26 | </p>
|
---|
27 | *
|
---|
28 | * <p>
|
---|
29 | * For more information about this service, see the API
|
---|
30 | * <a href="https://ads.google.com/local-services-ads/" target="_blank">Documentation</a>
|
---|
31 | * </p>
|
---|
32 | *
|
---|
33 | * @author Google, Inc.
|
---|
34 | */
|
---|
35 | class Localservices extends \Google\Service
|
---|
36 | {
|
---|
37 | /** See, edit, create, and delete your Google Ads accounts and data.. */
|
---|
38 | const ADWORDS =
|
---|
39 | "https://www.googleapis.com/auth/adwords";
|
---|
40 |
|
---|
41 | public $accountReports;
|
---|
42 | public $detailedLeadReports;
|
---|
43 | public $rootUrlTemplate;
|
---|
44 |
|
---|
45 | /**
|
---|
46 | * Constructs the internal representation of the Localservices service.
|
---|
47 | *
|
---|
48 | * @param Client|array $clientOrConfig The client used to deliver requests, or a
|
---|
49 | * config array to pass to a new Client instance.
|
---|
50 | * @param string $rootUrl The root URL used for requests to the service.
|
---|
51 | */
|
---|
52 | public function __construct($clientOrConfig = [], $rootUrl = null)
|
---|
53 | {
|
---|
54 | parent::__construct($clientOrConfig);
|
---|
55 | $this->rootUrl = $rootUrl ?: 'https://localservices.googleapis.com/';
|
---|
56 | $this->rootUrlTemplate = $rootUrl ?: 'https://localservices.UNIVERSE_DOMAIN/';
|
---|
57 | $this->servicePath = '';
|
---|
58 | $this->batchPath = 'batch';
|
---|
59 | $this->version = 'v1';
|
---|
60 | $this->serviceName = 'localservices';
|
---|
61 |
|
---|
62 | $this->accountReports = new Localservices\Resource\AccountReports(
|
---|
63 | $this,
|
---|
64 | $this->serviceName,
|
---|
65 | 'accountReports',
|
---|
66 | [
|
---|
67 | 'methods' => [
|
---|
68 | 'search' => [
|
---|
69 | 'path' => 'v1/accountReports:search',
|
---|
70 | 'httpMethod' => 'GET',
|
---|
71 | 'parameters' => [
|
---|
72 | 'endDate.day' => [
|
---|
73 | 'location' => 'query',
|
---|
74 | 'type' => 'integer',
|
---|
75 | ],
|
---|
76 | 'endDate.month' => [
|
---|
77 | 'location' => 'query',
|
---|
78 | 'type' => 'integer',
|
---|
79 | ],
|
---|
80 | 'endDate.year' => [
|
---|
81 | 'location' => 'query',
|
---|
82 | 'type' => 'integer',
|
---|
83 | ],
|
---|
84 | 'pageSize' => [
|
---|
85 | 'location' => 'query',
|
---|
86 | 'type' => 'integer',
|
---|
87 | ],
|
---|
88 | 'pageToken' => [
|
---|
89 | 'location' => 'query',
|
---|
90 | 'type' => 'string',
|
---|
91 | ],
|
---|
92 | 'query' => [
|
---|
93 | 'location' => 'query',
|
---|
94 | 'type' => 'string',
|
---|
95 | ],
|
---|
96 | 'startDate.day' => [
|
---|
97 | 'location' => 'query',
|
---|
98 | 'type' => 'integer',
|
---|
99 | ],
|
---|
100 | 'startDate.month' => [
|
---|
101 | 'location' => 'query',
|
---|
102 | 'type' => 'integer',
|
---|
103 | ],
|
---|
104 | 'startDate.year' => [
|
---|
105 | 'location' => 'query',
|
---|
106 | 'type' => 'integer',
|
---|
107 | ],
|
---|
108 | ],
|
---|
109 | ],
|
---|
110 | ]
|
---|
111 | ]
|
---|
112 | );
|
---|
113 | $this->detailedLeadReports = new Localservices\Resource\DetailedLeadReports(
|
---|
114 | $this,
|
---|
115 | $this->serviceName,
|
---|
116 | 'detailedLeadReports',
|
---|
117 | [
|
---|
118 | 'methods' => [
|
---|
119 | 'search' => [
|
---|
120 | 'path' => 'v1/detailedLeadReports:search',
|
---|
121 | 'httpMethod' => 'GET',
|
---|
122 | 'parameters' => [
|
---|
123 | 'endDate.day' => [
|
---|
124 | 'location' => 'query',
|
---|
125 | 'type' => 'integer',
|
---|
126 | ],
|
---|
127 | 'endDate.month' => [
|
---|
128 | 'location' => 'query',
|
---|
129 | 'type' => 'integer',
|
---|
130 | ],
|
---|
131 | 'endDate.year' => [
|
---|
132 | 'location' => 'query',
|
---|
133 | 'type' => 'integer',
|
---|
134 | ],
|
---|
135 | 'pageSize' => [
|
---|
136 | 'location' => 'query',
|
---|
137 | 'type' => 'integer',
|
---|
138 | ],
|
---|
139 | 'pageToken' => [
|
---|
140 | 'location' => 'query',
|
---|
141 | 'type' => 'string',
|
---|
142 | ],
|
---|
143 | 'query' => [
|
---|
144 | 'location' => 'query',
|
---|
145 | 'type' => 'string',
|
---|
146 | ],
|
---|
147 | 'startDate.day' => [
|
---|
148 | 'location' => 'query',
|
---|
149 | 'type' => 'integer',
|
---|
150 | ],
|
---|
151 | 'startDate.month' => [
|
---|
152 | 'location' => 'query',
|
---|
153 | 'type' => 'integer',
|
---|
154 | ],
|
---|
155 | 'startDate.year' => [
|
---|
156 | 'location' => 'query',
|
---|
157 | 'type' => 'integer',
|
---|
158 | ],
|
---|
159 | ],
|
---|
160 | ],
|
---|
161 | ]
|
---|
162 | ]
|
---|
163 | );
|
---|
164 | }
|
---|
165 | }
|
---|
166 |
|
---|
167 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
168 | class_alias(Localservices::class, 'Google_Service_Localservices');
|
---|