source: vendor/google/apiclient-services/src/SearchConsole.php@ e3d4e0a

Last change on this file since e3d4e0a was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 7 days ago

Upload project files

  • Property mode set to 100644
File size: 7.3 KB
Line 
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
18namespace Google\Service;
19
20use Google\Client;
21
22/**
23 * Service definition for SearchConsole (v1).
24 *
25 * <p>
26 * The Search Console API provides access to both Search Console data (verified
27 * users only) and to public information on an URL basis (anyone)</p>
28 *
29 * <p>
30 * For more information about this service, see the API
31 * <a href="https://developers.google.com/webmaster-tools/about" target="_blank">Documentation</a>
32 * </p>
33 *
34 * @author Google, Inc.
35 */
36class SearchConsole extends \Google\Service
37{
38 /** View and manage Search Console data for your verified sites. */
39 const WEBMASTERS =
40 "https://www.googleapis.com/auth/webmasters";
41 /** View Search Console data for your verified sites. */
42 const WEBMASTERS_READONLY =
43 "https://www.googleapis.com/auth/webmasters.readonly";
44
45 public $searchanalytics;
46 public $sitemaps;
47 public $sites;
48 public $urlInspection_index;
49 public $urlTestingTools_mobileFriendlyTest;
50 public $rootUrlTemplate;
51
52 /**
53 * Constructs the internal representation of the SearchConsole service.
54 *
55 * @param Client|array $clientOrConfig The client used to deliver requests, or a
56 * config array to pass to a new Client instance.
57 * @param string $rootUrl The root URL used for requests to the service.
58 */
59 public function __construct($clientOrConfig = [], $rootUrl = null)
60 {
61 parent::__construct($clientOrConfig);
62 $this->rootUrl = $rootUrl ?: 'https://searchconsole.googleapis.com/';
63 $this->rootUrlTemplate = $rootUrl ?: 'https://searchconsole.UNIVERSE_DOMAIN/';
64 $this->servicePath = '';
65 $this->batchPath = 'batch';
66 $this->version = 'v1';
67 $this->serviceName = 'searchconsole';
68
69 $this->searchanalytics = new SearchConsole\Resource\Searchanalytics(
70 $this,
71 $this->serviceName,
72 'searchanalytics',
73 [
74 'methods' => [
75 'query' => [
76 'path' => 'webmasters/v3/sites/{siteUrl}/searchAnalytics/query',
77 'httpMethod' => 'POST',
78 'parameters' => [
79 'siteUrl' => [
80 'location' => 'path',
81 'type' => 'string',
82 'required' => true,
83 ],
84 ],
85 ],
86 ]
87 ]
88 );
89 $this->sitemaps = new SearchConsole\Resource\Sitemaps(
90 $this,
91 $this->serviceName,
92 'sitemaps',
93 [
94 'methods' => [
95 'delete' => [
96 'path' => 'webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}',
97 'httpMethod' => 'DELETE',
98 'parameters' => [
99 'siteUrl' => [
100 'location' => 'path',
101 'type' => 'string',
102 'required' => true,
103 ],
104 'feedpath' => [
105 'location' => 'path',
106 'type' => 'string',
107 'required' => true,
108 ],
109 ],
110 ],'get' => [
111 'path' => 'webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}',
112 'httpMethod' => 'GET',
113 'parameters' => [
114 'siteUrl' => [
115 'location' => 'path',
116 'type' => 'string',
117 'required' => true,
118 ],
119 'feedpath' => [
120 'location' => 'path',
121 'type' => 'string',
122 'required' => true,
123 ],
124 ],
125 ],'list' => [
126 'path' => 'webmasters/v3/sites/{siteUrl}/sitemaps',
127 'httpMethod' => 'GET',
128 'parameters' => [
129 'siteUrl' => [
130 'location' => 'path',
131 'type' => 'string',
132 'required' => true,
133 ],
134 'sitemapIndex' => [
135 'location' => 'query',
136 'type' => 'string',
137 ],
138 ],
139 ],'submit' => [
140 'path' => 'webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}',
141 'httpMethod' => 'PUT',
142 'parameters' => [
143 'siteUrl' => [
144 'location' => 'path',
145 'type' => 'string',
146 'required' => true,
147 ],
148 'feedpath' => [
149 'location' => 'path',
150 'type' => 'string',
151 'required' => true,
152 ],
153 ],
154 ],
155 ]
156 ]
157 );
158 $this->sites = new SearchConsole\Resource\Sites(
159 $this,
160 $this->serviceName,
161 'sites',
162 [
163 'methods' => [
164 'add' => [
165 'path' => 'webmasters/v3/sites/{siteUrl}',
166 'httpMethod' => 'PUT',
167 'parameters' => [
168 'siteUrl' => [
169 'location' => 'path',
170 'type' => 'string',
171 'required' => true,
172 ],
173 ],
174 ],'delete' => [
175 'path' => 'webmasters/v3/sites/{siteUrl}',
176 'httpMethod' => 'DELETE',
177 'parameters' => [
178 'siteUrl' => [
179 'location' => 'path',
180 'type' => 'string',
181 'required' => true,
182 ],
183 ],
184 ],'get' => [
185 'path' => 'webmasters/v3/sites/{siteUrl}',
186 'httpMethod' => 'GET',
187 'parameters' => [
188 'siteUrl' => [
189 'location' => 'path',
190 'type' => 'string',
191 'required' => true,
192 ],
193 ],
194 ],'list' => [
195 'path' => 'webmasters/v3/sites',
196 'httpMethod' => 'GET',
197 'parameters' => [],
198 ],
199 ]
200 ]
201 );
202 $this->urlInspection_index = new SearchConsole\Resource\UrlInspectionIndex(
203 $this,
204 $this->serviceName,
205 'index',
206 [
207 'methods' => [
208 'inspect' => [
209 'path' => 'v1/urlInspection/index:inspect',
210 'httpMethod' => 'POST',
211 'parameters' => [],
212 ],
213 ]
214 ]
215 );
216 $this->urlTestingTools_mobileFriendlyTest = new SearchConsole\Resource\UrlTestingToolsMobileFriendlyTest(
217 $this,
218 $this->serviceName,
219 'mobileFriendlyTest',
220 [
221 'methods' => [
222 'run' => [
223 'path' => 'v1/urlTestingTools/mobileFriendlyTest:run',
224 'httpMethod' => 'POST',
225 'parameters' => [],
226 ],
227 ]
228 ]
229 );
230 }
231}
232
233// Adding a class alias for backwards compatibility with the previous class name.
234class_alias(SearchConsole::class, 'Google_Service_SearchConsole');
Note: See TracBrowser for help on using the repository browser.