source: vendor/google/apiclient-services/src/SiteVerification/Resource/WebResource.php@ e3d4e0a

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

Upload project files

  • Property mode set to 100644
File size: 5.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\SiteVerification\Resource;
19
20use Google\Service\SiteVerification\SiteVerificationWebResourceGettokenRequest;
21use Google\Service\SiteVerification\SiteVerificationWebResourceGettokenResponse;
22use Google\Service\SiteVerification\SiteVerificationWebResourceListResponse;
23use Google\Service\SiteVerification\SiteVerificationWebResourceResource;
24
25/**
26 * The "webResource" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $siteVerificationService = new Google\Service\SiteVerification(...);
30 * $webResource = $siteVerificationService->webResource;
31 * </code>
32 */
33class WebResource extends \Google\Service\Resource
34{
35 /**
36 * Relinquish ownership of a website or domain. (webResource.delete)
37 *
38 * @param string $id The id of a verified site or domain.
39 * @param array $optParams Optional parameters.
40 * @throws \Google\Service\Exception
41 */
42 public function delete($id, $optParams = [])
43 {
44 $params = ['id' => $id];
45 $params = array_merge($params, $optParams);
46 return $this->call('delete', [$params]);
47 }
48 /**
49 * Get the most current data for a website or domain. (webResource.get)
50 *
51 * @param string $id The id of a verified site or domain.
52 * @param array $optParams Optional parameters.
53 * @return SiteVerificationWebResourceResource
54 * @throws \Google\Service\Exception
55 */
56 public function get($id, $optParams = [])
57 {
58 $params = ['id' => $id];
59 $params = array_merge($params, $optParams);
60 return $this->call('get', [$params], SiteVerificationWebResourceResource::class);
61 }
62 /**
63 * Get a verification token for placing on a website or domain.
64 * (webResource.getToken)
65 *
66 * @param SiteVerificationWebResourceGettokenRequest $postBody
67 * @param array $optParams Optional parameters.
68 * @return SiteVerificationWebResourceGettokenResponse
69 * @throws \Google\Service\Exception
70 */
71 public function getToken(SiteVerificationWebResourceGettokenRequest $postBody, $optParams = [])
72 {
73 $params = ['postBody' => $postBody];
74 $params = array_merge($params, $optParams);
75 return $this->call('getToken', [$params], SiteVerificationWebResourceGettokenResponse::class);
76 }
77 /**
78 * Attempt verification of a website or domain. (webResource.insert)
79 *
80 * @param string $verificationMethod The method to use for verifying a site or
81 * domain.
82 * @param SiteVerificationWebResourceResource $postBody
83 * @param array $optParams Optional parameters.
84 * @return SiteVerificationWebResourceResource
85 * @throws \Google\Service\Exception
86 */
87 public function insert($verificationMethod, SiteVerificationWebResourceResource $postBody, $optParams = [])
88 {
89 $params = ['verificationMethod' => $verificationMethod, 'postBody' => $postBody];
90 $params = array_merge($params, $optParams);
91 return $this->call('insert', [$params], SiteVerificationWebResourceResource::class);
92 }
93 /**
94 * Get the list of your verified websites and domains.
95 * (webResource.listWebResource)
96 *
97 * @param array $optParams Optional parameters.
98 * @return SiteVerificationWebResourceListResponse
99 * @throws \Google\Service\Exception
100 */
101 public function listWebResource($optParams = [])
102 {
103 $params = [];
104 $params = array_merge($params, $optParams);
105 return $this->call('list', [$params], SiteVerificationWebResourceListResponse::class);
106 }
107 /**
108 * Modify the list of owners for your website or domain. This method supports
109 * patch semantics. (webResource.patch)
110 *
111 * @param string $id The id of a verified site or domain.
112 * @param SiteVerificationWebResourceResource $postBody
113 * @param array $optParams Optional parameters.
114 * @return SiteVerificationWebResourceResource
115 * @throws \Google\Service\Exception
116 */
117 public function patch($id, SiteVerificationWebResourceResource $postBody, $optParams = [])
118 {
119 $params = ['id' => $id, 'postBody' => $postBody];
120 $params = array_merge($params, $optParams);
121 return $this->call('patch', [$params], SiteVerificationWebResourceResource::class);
122 }
123 /**
124 * Modify the list of owners for your website or domain. (webResource.update)
125 *
126 * @param string $id The id of a verified site or domain.
127 * @param SiteVerificationWebResourceResource $postBody
128 * @param array $optParams Optional parameters.
129 * @return SiteVerificationWebResourceResource
130 * @throws \Google\Service\Exception
131 */
132 public function update($id, SiteVerificationWebResourceResource $postBody, $optParams = [])
133 {
134 $params = ['id' => $id, 'postBody' => $postBody];
135 $params = array_merge($params, $optParams);
136 return $this->call('update', [$params], SiteVerificationWebResourceResource::class);
137 }
138}
139
140// Adding a class alias for backwards compatibility with the previous class name.
141class_alias(WebResource::class, 'Google_Service_SiteVerification_Resource_WebResource');
Note: See TracBrowser for help on using the repository browser.