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

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

Upload project files

  • Property mode set to 100644
File size: 3.0 KB
RevLine 
[e3d4e0a]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\SitesListResponse;
21use Google\Service\SearchConsole\WmxSite;
22
23/**
24 * The "sites" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $searchconsoleService = new Google\Service\SearchConsole(...);
28 * $sites = $searchconsoleService->sites;
29 * </code>
30 */
31class Sites extends \Google\Service\Resource
32{
33 /**
34 * Adds a site to the set of the user's sites in Search Console. (sites.add)
35 *
36 * @param string $siteUrl The URL of the site to add.
37 * @param array $optParams Optional parameters.
38 * @throws \Google\Service\Exception
39 */
40 public function add($siteUrl, $optParams = [])
41 {
42 $params = ['siteUrl' => $siteUrl];
43 $params = array_merge($params, $optParams);
44 return $this->call('add', [$params]);
45 }
46 /**
47 * Removes a site from the set of the user's Search Console sites.
48 * (sites.delete)
49 *
50 * @param string $siteUrl The URI of the property as defined in Search Console.
51 * **Examples:** `http://www.example.com/` or `sc-domain:example.com`.
52 * @param array $optParams Optional parameters.
53 * @throws \Google\Service\Exception
54 */
55 public function delete($siteUrl, $optParams = [])
56 {
57 $params = ['siteUrl' => $siteUrl];
58 $params = array_merge($params, $optParams);
59 return $this->call('delete', [$params]);
60 }
61 /**
62 * Retrieves information about specific site. (sites.get)
63 *
64 * @param string $siteUrl The URI of the property as defined in Search Console.
65 * **Examples:** `http://www.example.com/` or `sc-domain:example.com`.
66 * @param array $optParams Optional parameters.
67 * @return WmxSite
68 * @throws \Google\Service\Exception
69 */
70 public function get($siteUrl, $optParams = [])
71 {
72 $params = ['siteUrl' => $siteUrl];
73 $params = array_merge($params, $optParams);
74 return $this->call('get', [$params], WmxSite::class);
75 }
76 /**
77 * Lists the user's Search Console sites. (sites.listSites)
78 *
79 * @param array $optParams Optional parameters.
80 * @return SitesListResponse
81 * @throws \Google\Service\Exception
82 */
83 public function listSites($optParams = [])
84 {
85 $params = [];
86 $params = array_merge($params, $optParams);
87 return $this->call('list', [$params], SitesListResponse::class);
88 }
89}
90
91// Adding a class alias for backwards compatibility with the previous class name.
92class_alias(Sites::class, 'Google_Service_SearchConsole_Resource_Sites');
Note: See TracBrowser for help on using the repository browser.