source: vendor/google/apiclient-services/src/SearchConsole/Resource/Sitemaps.php

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

Upload project files

  • Property mode set to 100644
File size: 3.9 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\SearchConsole\Resource;
19
20use Google\Service\SearchConsole\SitemapsListResponse;
21use Google\Service\SearchConsole\WmxSitemap;
22
23/**
24 * The "sitemaps" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $searchconsoleService = new Google\Service\SearchConsole(...);
28 * $sitemaps = $searchconsoleService->sitemaps;
29 * </code>
30 */
31class Sitemaps extends \Google\Service\Resource
32{
33 /**
34 * Deletes a sitemap from the Sitemaps report. Does not stop Google from
35 * crawling this sitemap or the URLs that were previously crawled in the deleted
36 * sitemap. (sitemaps.delete)
37 *
38 * @param string $siteUrl The site's URL, including protocol. For example:
39 * `http://www.example.com/`.
40 * @param string $feedpath The URL of the actual sitemap. For example:
41 * `http://www.example.com/sitemap.xml`.
42 * @param array $optParams Optional parameters.
43 * @throws \Google\Service\Exception
44 */
45 public function delete($siteUrl, $feedpath, $optParams = [])
46 {
47 $params = ['siteUrl' => $siteUrl, 'feedpath' => $feedpath];
48 $params = array_merge($params, $optParams);
49 return $this->call('delete', [$params]);
50 }
51 /**
52 * Retrieves information about a specific sitemap. (sitemaps.get)
53 *
54 * @param string $siteUrl The site's URL, including protocol. For example:
55 * `http://www.example.com/`.
56 * @param string $feedpath The URL of the actual sitemap. For example:
57 * `http://www.example.com/sitemap.xml`.
58 * @param array $optParams Optional parameters.
59 * @return WmxSitemap
60 * @throws \Google\Service\Exception
61 */
62 public function get($siteUrl, $feedpath, $optParams = [])
63 {
64 $params = ['siteUrl' => $siteUrl, 'feedpath' => $feedpath];
65 $params = array_merge($params, $optParams);
66 return $this->call('get', [$params], WmxSitemap::class);
67 }
68 /**
69 * Lists the [sitemaps-entries](/webmaster-tools/v3/sitemaps) submitted for this
70 * site, or included in the sitemap index file (if `sitemapIndex` is specified
71 * in the request). (sitemaps.listSitemaps)
72 *
73 * @param string $siteUrl The site's URL, including protocol. For example:
74 * `http://www.example.com/`.
75 * @param array $optParams Optional parameters.
76 *
77 * @opt_param string sitemapIndex A URL of a site's sitemap index. For example:
78 * `http://www.example.com/sitemapindex.xml`.
79 * @return SitemapsListResponse
80 * @throws \Google\Service\Exception
81 */
82 public function listSitemaps($siteUrl, $optParams = [])
83 {
84 $params = ['siteUrl' => $siteUrl];
85 $params = array_merge($params, $optParams);
86 return $this->call('list', [$params], SitemapsListResponse::class);
87 }
88 /**
89 * Submits a sitemap for a site. (sitemaps.submit)
90 *
91 * @param string $siteUrl The site's URL, including protocol. For example:
92 * `http://www.example.com/`.
93 * @param string $feedpath The URL of the actual sitemap. For example:
94 * `http://www.example.com/sitemap.xml`.
95 * @param array $optParams Optional parameters.
96 * @throws \Google\Service\Exception
97 */
98 public function submit($siteUrl, $feedpath, $optParams = [])
99 {
100 $params = ['siteUrl' => $siteUrl, 'feedpath' => $feedpath];
101 $params = array_merge($params, $optParams);
102 return $this->call('submit', [$params]);
103 }
104}
105
106// Adding a class alias for backwards compatibility with the previous class name.
107class_alias(Sitemaps::class, 'Google_Service_SearchConsole_Resource_Sitemaps');
Note: See TracBrowser for help on using the repository browser.