source: vendor/google/apiclient-services/src/Blogger/Resource/Pages.php@ e3d4e0a

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

Upload project files

  • Property mode set to 100644
File size: 5.1 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\Blogger\Resource;
19
20use Google\Service\Blogger\Page;
21use Google\Service\Blogger\PageList;
22
23/**
24 * The "pages" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $bloggerService = new Google\Service\Blogger(...);
28 * $pages = $bloggerService->pages;
29 * </code>
30 */
31class Pages extends \Google\Service\Resource
32{
33 /**
34 * Deletes a page by blog id and page id. (pages.delete)
35 *
36 * @param string $blogId
37 * @param string $pageId
38 * @param array $optParams Optional parameters.
39 *
40 * @opt_param bool useTrash Move to Trash if possible
41 * @throws \Google\Service\Exception
42 */
43 public function delete($blogId, $pageId, $optParams = [])
44 {
45 $params = ['blogId' => $blogId, 'pageId' => $pageId];
46 $params = array_merge($params, $optParams);
47 return $this->call('delete', [$params]);
48 }
49 /**
50 * Gets a page by blog id and page id. (pages.get)
51 *
52 * @param string $blogId
53 * @param string $pageId
54 * @param array $optParams Optional parameters.
55 *
56 * @opt_param string view
57 * @return Page
58 * @throws \Google\Service\Exception
59 */
60 public function get($blogId, $pageId, $optParams = [])
61 {
62 $params = ['blogId' => $blogId, 'pageId' => $pageId];
63 $params = array_merge($params, $optParams);
64 return $this->call('get', [$params], Page::class);
65 }
66 /**
67 * Inserts a page. (pages.insert)
68 *
69 * @param string $blogId
70 * @param Page $postBody
71 * @param array $optParams Optional parameters.
72 *
73 * @opt_param bool isDraft
74 * @return Page
75 * @throws \Google\Service\Exception
76 */
77 public function insert($blogId, Page $postBody, $optParams = [])
78 {
79 $params = ['blogId' => $blogId, 'postBody' => $postBody];
80 $params = array_merge($params, $optParams);
81 return $this->call('insert', [$params], Page::class);
82 }
83 /**
84 * Lists pages. (pages.listPages)
85 *
86 * @param string $blogId
87 * @param array $optParams Optional parameters.
88 *
89 * @opt_param bool fetchBodies
90 * @opt_param string maxResults
91 * @opt_param string pageToken
92 * @opt_param string status
93 * @opt_param string view
94 * @return PageList
95 * @throws \Google\Service\Exception
96 */
97 public function listPages($blogId, $optParams = [])
98 {
99 $params = ['blogId' => $blogId];
100 $params = array_merge($params, $optParams);
101 return $this->call('list', [$params], PageList::class);
102 }
103 /**
104 * Patches a page. (pages.patch)
105 *
106 * @param string $blogId
107 * @param string $pageId
108 * @param Page $postBody
109 * @param array $optParams Optional parameters.
110 *
111 * @opt_param bool publish
112 * @opt_param bool revert
113 * @return Page
114 * @throws \Google\Service\Exception
115 */
116 public function patch($blogId, $pageId, Page $postBody, $optParams = [])
117 {
118 $params = ['blogId' => $blogId, 'pageId' => $pageId, 'postBody' => $postBody];
119 $params = array_merge($params, $optParams);
120 return $this->call('patch', [$params], Page::class);
121 }
122 /**
123 * Publishes a page. (pages.publish)
124 *
125 * @param string $blogId
126 * @param string $pageId
127 * @param array $optParams Optional parameters.
128 * @return Page
129 * @throws \Google\Service\Exception
130 */
131 public function publish($blogId, $pageId, $optParams = [])
132 {
133 $params = ['blogId' => $blogId, 'pageId' => $pageId];
134 $params = array_merge($params, $optParams);
135 return $this->call('publish', [$params], Page::class);
136 }
137 /**
138 * Reverts a published or scheduled page to draft state. (pages.revert)
139 *
140 * @param string $blogId
141 * @param string $pageId
142 * @param array $optParams Optional parameters.
143 * @return Page
144 * @throws \Google\Service\Exception
145 */
146 public function revert($blogId, $pageId, $optParams = [])
147 {
148 $params = ['blogId' => $blogId, 'pageId' => $pageId];
149 $params = array_merge($params, $optParams);
150 return $this->call('revert', [$params], Page::class);
151 }
152 /**
153 * Updates a page by blog id and page id. (pages.update)
154 *
155 * @param string $blogId
156 * @param string $pageId
157 * @param Page $postBody
158 * @param array $optParams Optional parameters.
159 *
160 * @opt_param bool publish
161 * @opt_param bool revert
162 * @return Page
163 * @throws \Google\Service\Exception
164 */
165 public function update($blogId, $pageId, Page $postBody, $optParams = [])
166 {
167 $params = ['blogId' => $blogId, 'pageId' => $pageId, 'postBody' => $postBody];
168 $params = array_merge($params, $optParams);
169 return $this->call('update', [$params], Page::class);
170 }
171}
172
173// Adding a class alias for backwards compatibility with the previous class name.
174class_alias(Pages::class, 'Google_Service_Blogger_Resource_Pages');
Note: See TracBrowser for help on using the repository browser.