Blogger.php 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954
  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. namespace Google\Service;
  18. use Google\Client;
  19. /**
  20. * Service definition for Blogger (v3).
  21. *
  22. * <p>
  23. * The Blogger API provides access to posts, comments and pages of a Blogger
  24. * blog.</p>
  25. *
  26. * <p>
  27. * For more information about this service, see the API
  28. * <a href="https://developers.google.com/blogger/docs/3.0/getting_started" target="_blank">Documentation</a>
  29. * </p>
  30. *
  31. * @author Google, Inc.
  32. */
  33. class Blogger extends \Google\Service
  34. {
  35. /** Manage your Blogger account. */
  36. const BLOGGER =
  37. "https://www.googleapis.com/auth/blogger";
  38. /** View your Blogger account. */
  39. const BLOGGER_READONLY =
  40. "https://www.googleapis.com/auth/blogger.readonly";
  41. public $blogUserInfos;
  42. public $blogs;
  43. public $comments;
  44. public $pageViews;
  45. public $pages;
  46. public $postUserInfos;
  47. public $posts;
  48. public $users;
  49. public $rootUrlTemplate;
  50. /**
  51. * Constructs the internal representation of the Blogger service.
  52. *
  53. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  54. * config array to pass to a new Client instance.
  55. * @param string $rootUrl The root URL used for requests to the service.
  56. */
  57. public function __construct($clientOrConfig = [], $rootUrl = null)
  58. {
  59. parent::__construct($clientOrConfig);
  60. $this->rootUrl = $rootUrl ?: 'https://blogger.googleapis.com/';
  61. $this->rootUrlTemplate = $rootUrl ?: 'https://blogger.UNIVERSE_DOMAIN/';
  62. $this->servicePath = '';
  63. $this->batchPath = 'batch';
  64. $this->version = 'v3';
  65. $this->serviceName = 'blogger';
  66. $this->blogUserInfos = new Blogger\Resource\BlogUserInfos(
  67. $this,
  68. $this->serviceName,
  69. 'blogUserInfos',
  70. [
  71. 'methods' => [
  72. 'get' => [
  73. 'path' => 'v3/users/{userId}/blogs/{blogId}',
  74. 'httpMethod' => 'GET',
  75. 'parameters' => [
  76. 'userId' => [
  77. 'location' => 'path',
  78. 'type' => 'string',
  79. 'required' => true,
  80. ],
  81. 'blogId' => [
  82. 'location' => 'path',
  83. 'type' => 'string',
  84. 'required' => true,
  85. ],
  86. 'maxPosts' => [
  87. 'location' => 'query',
  88. 'type' => 'integer',
  89. ],
  90. ],
  91. ],
  92. ]
  93. ]
  94. );
  95. $this->blogs = new Blogger\Resource\Blogs(
  96. $this,
  97. $this->serviceName,
  98. 'blogs',
  99. [
  100. 'methods' => [
  101. 'get' => [
  102. 'path' => 'v3/blogs/{blogId}',
  103. 'httpMethod' => 'GET',
  104. 'parameters' => [
  105. 'blogId' => [
  106. 'location' => 'path',
  107. 'type' => 'string',
  108. 'required' => true,
  109. ],
  110. 'maxPosts' => [
  111. 'location' => 'query',
  112. 'type' => 'integer',
  113. ],
  114. 'view' => [
  115. 'location' => 'query',
  116. 'type' => 'string',
  117. ],
  118. ],
  119. ],'getByUrl' => [
  120. 'path' => 'v3/blogs/byurl',
  121. 'httpMethod' => 'GET',
  122. 'parameters' => [
  123. 'url' => [
  124. 'location' => 'query',
  125. 'type' => 'string',
  126. 'required' => true,
  127. ],
  128. 'view' => [
  129. 'location' => 'query',
  130. 'type' => 'string',
  131. ],
  132. ],
  133. ],'listByUser' => [
  134. 'path' => 'v3/users/{userId}/blogs',
  135. 'httpMethod' => 'GET',
  136. 'parameters' => [
  137. 'userId' => [
  138. 'location' => 'path',
  139. 'type' => 'string',
  140. 'required' => true,
  141. ],
  142. 'fetchUserInfo' => [
  143. 'location' => 'query',
  144. 'type' => 'boolean',
  145. ],
  146. 'role' => [
  147. 'location' => 'query',
  148. 'type' => 'string',
  149. 'repeated' => true,
  150. ],
  151. 'status' => [
  152. 'location' => 'query',
  153. 'type' => 'string',
  154. 'repeated' => true,
  155. ],
  156. 'view' => [
  157. 'location' => 'query',
  158. 'type' => 'string',
  159. ],
  160. ],
  161. ],
  162. ]
  163. ]
  164. );
  165. $this->comments = new Blogger\Resource\Comments(
  166. $this,
  167. $this->serviceName,
  168. 'comments',
  169. [
  170. 'methods' => [
  171. 'approve' => [
  172. 'path' => 'v3/blogs/{blogId}/posts/{postId}/comments/{commentId}/approve',
  173. 'httpMethod' => 'POST',
  174. 'parameters' => [
  175. 'blogId' => [
  176. 'location' => 'path',
  177. 'type' => 'string',
  178. 'required' => true,
  179. ],
  180. 'postId' => [
  181. 'location' => 'path',
  182. 'type' => 'string',
  183. 'required' => true,
  184. ],
  185. 'commentId' => [
  186. 'location' => 'path',
  187. 'type' => 'string',
  188. 'required' => true,
  189. ],
  190. ],
  191. ],'delete' => [
  192. 'path' => 'v3/blogs/{blogId}/posts/{postId}/comments/{commentId}',
  193. 'httpMethod' => 'DELETE',
  194. 'parameters' => [
  195. 'blogId' => [
  196. 'location' => 'path',
  197. 'type' => 'string',
  198. 'required' => true,
  199. ],
  200. 'postId' => [
  201. 'location' => 'path',
  202. 'type' => 'string',
  203. 'required' => true,
  204. ],
  205. 'commentId' => [
  206. 'location' => 'path',
  207. 'type' => 'string',
  208. 'required' => true,
  209. ],
  210. ],
  211. ],'get' => [
  212. 'path' => 'v3/blogs/{blogId}/posts/{postId}/comments/{commentId}',
  213. 'httpMethod' => 'GET',
  214. 'parameters' => [
  215. 'blogId' => [
  216. 'location' => 'path',
  217. 'type' => 'string',
  218. 'required' => true,
  219. ],
  220. 'postId' => [
  221. 'location' => 'path',
  222. 'type' => 'string',
  223. 'required' => true,
  224. ],
  225. 'commentId' => [
  226. 'location' => 'path',
  227. 'type' => 'string',
  228. 'required' => true,
  229. ],
  230. 'view' => [
  231. 'location' => 'query',
  232. 'type' => 'string',
  233. ],
  234. ],
  235. ],'list' => [
  236. 'path' => 'v3/blogs/{blogId}/posts/{postId}/comments',
  237. 'httpMethod' => 'GET',
  238. 'parameters' => [
  239. 'blogId' => [
  240. 'location' => 'path',
  241. 'type' => 'string',
  242. 'required' => true,
  243. ],
  244. 'postId' => [
  245. 'location' => 'path',
  246. 'type' => 'string',
  247. 'required' => true,
  248. ],
  249. 'endDate' => [
  250. 'location' => 'query',
  251. 'type' => 'string',
  252. ],
  253. 'fetchBodies' => [
  254. 'location' => 'query',
  255. 'type' => 'boolean',
  256. ],
  257. 'maxResults' => [
  258. 'location' => 'query',
  259. 'type' => 'integer',
  260. ],
  261. 'pageToken' => [
  262. 'location' => 'query',
  263. 'type' => 'string',
  264. ],
  265. 'startDate' => [
  266. 'location' => 'query',
  267. 'type' => 'string',
  268. ],
  269. 'status' => [
  270. 'location' => 'query',
  271. 'type' => 'string',
  272. ],
  273. 'view' => [
  274. 'location' => 'query',
  275. 'type' => 'string',
  276. ],
  277. ],
  278. ],'listByBlog' => [
  279. 'path' => 'v3/blogs/{blogId}/comments',
  280. 'httpMethod' => 'GET',
  281. 'parameters' => [
  282. 'blogId' => [
  283. 'location' => 'path',
  284. 'type' => 'string',
  285. 'required' => true,
  286. ],
  287. 'endDate' => [
  288. 'location' => 'query',
  289. 'type' => 'string',
  290. ],
  291. 'fetchBodies' => [
  292. 'location' => 'query',
  293. 'type' => 'boolean',
  294. ],
  295. 'maxResults' => [
  296. 'location' => 'query',
  297. 'type' => 'integer',
  298. ],
  299. 'pageToken' => [
  300. 'location' => 'query',
  301. 'type' => 'string',
  302. ],
  303. 'startDate' => [
  304. 'location' => 'query',
  305. 'type' => 'string',
  306. ],
  307. 'status' => [
  308. 'location' => 'query',
  309. 'type' => 'string',
  310. 'repeated' => true,
  311. ],
  312. ],
  313. ],'markAsSpam' => [
  314. 'path' => 'v3/blogs/{blogId}/posts/{postId}/comments/{commentId}/spam',
  315. 'httpMethod' => 'POST',
  316. 'parameters' => [
  317. 'blogId' => [
  318. 'location' => 'path',
  319. 'type' => 'string',
  320. 'required' => true,
  321. ],
  322. 'postId' => [
  323. 'location' => 'path',
  324. 'type' => 'string',
  325. 'required' => true,
  326. ],
  327. 'commentId' => [
  328. 'location' => 'path',
  329. 'type' => 'string',
  330. 'required' => true,
  331. ],
  332. ],
  333. ],'removeContent' => [
  334. 'path' => 'v3/blogs/{blogId}/posts/{postId}/comments/{commentId}/removecontent',
  335. 'httpMethod' => 'POST',
  336. 'parameters' => [
  337. 'blogId' => [
  338. 'location' => 'path',
  339. 'type' => 'string',
  340. 'required' => true,
  341. ],
  342. 'postId' => [
  343. 'location' => 'path',
  344. 'type' => 'string',
  345. 'required' => true,
  346. ],
  347. 'commentId' => [
  348. 'location' => 'path',
  349. 'type' => 'string',
  350. 'required' => true,
  351. ],
  352. ],
  353. ],
  354. ]
  355. ]
  356. );
  357. $this->pageViews = new Blogger\Resource\PageViews(
  358. $this,
  359. $this->serviceName,
  360. 'pageViews',
  361. [
  362. 'methods' => [
  363. 'get' => [
  364. 'path' => 'v3/blogs/{blogId}/pageviews',
  365. 'httpMethod' => 'GET',
  366. 'parameters' => [
  367. 'blogId' => [
  368. 'location' => 'path',
  369. 'type' => 'string',
  370. 'required' => true,
  371. ],
  372. 'range' => [
  373. 'location' => 'query',
  374. 'type' => 'string',
  375. 'repeated' => true,
  376. ],
  377. ],
  378. ],
  379. ]
  380. ]
  381. );
  382. $this->pages = new Blogger\Resource\Pages(
  383. $this,
  384. $this->serviceName,
  385. 'pages',
  386. [
  387. 'methods' => [
  388. 'delete' => [
  389. 'path' => 'v3/blogs/{blogId}/pages/{pageId}',
  390. 'httpMethod' => 'DELETE',
  391. 'parameters' => [
  392. 'blogId' => [
  393. 'location' => 'path',
  394. 'type' => 'string',
  395. 'required' => true,
  396. ],
  397. 'pageId' => [
  398. 'location' => 'path',
  399. 'type' => 'string',
  400. 'required' => true,
  401. ],
  402. 'useTrash' => [
  403. 'location' => 'query',
  404. 'type' => 'boolean',
  405. ],
  406. ],
  407. ],'get' => [
  408. 'path' => 'v3/blogs/{blogId}/pages/{pageId}',
  409. 'httpMethod' => 'GET',
  410. 'parameters' => [
  411. 'blogId' => [
  412. 'location' => 'path',
  413. 'type' => 'string',
  414. 'required' => true,
  415. ],
  416. 'pageId' => [
  417. 'location' => 'path',
  418. 'type' => 'string',
  419. 'required' => true,
  420. ],
  421. 'view' => [
  422. 'location' => 'query',
  423. 'type' => 'string',
  424. ],
  425. ],
  426. ],'insert' => [
  427. 'path' => 'v3/blogs/{blogId}/pages',
  428. 'httpMethod' => 'POST',
  429. 'parameters' => [
  430. 'blogId' => [
  431. 'location' => 'path',
  432. 'type' => 'string',
  433. 'required' => true,
  434. ],
  435. 'isDraft' => [
  436. 'location' => 'query',
  437. 'type' => 'boolean',
  438. ],
  439. ],
  440. ],'list' => [
  441. 'path' => 'v3/blogs/{blogId}/pages',
  442. 'httpMethod' => 'GET',
  443. 'parameters' => [
  444. 'blogId' => [
  445. 'location' => 'path',
  446. 'type' => 'string',
  447. 'required' => true,
  448. ],
  449. 'fetchBodies' => [
  450. 'location' => 'query',
  451. 'type' => 'boolean',
  452. ],
  453. 'maxResults' => [
  454. 'location' => 'query',
  455. 'type' => 'integer',
  456. ],
  457. 'pageToken' => [
  458. 'location' => 'query',
  459. 'type' => 'string',
  460. ],
  461. 'status' => [
  462. 'location' => 'query',
  463. 'type' => 'string',
  464. 'repeated' => true,
  465. ],
  466. 'view' => [
  467. 'location' => 'query',
  468. 'type' => 'string',
  469. ],
  470. ],
  471. ],'patch' => [
  472. 'path' => 'v3/blogs/{blogId}/pages/{pageId}',
  473. 'httpMethod' => 'PATCH',
  474. 'parameters' => [
  475. 'blogId' => [
  476. 'location' => 'path',
  477. 'type' => 'string',
  478. 'required' => true,
  479. ],
  480. 'pageId' => [
  481. 'location' => 'path',
  482. 'type' => 'string',
  483. 'required' => true,
  484. ],
  485. 'publish' => [
  486. 'location' => 'query',
  487. 'type' => 'boolean',
  488. ],
  489. 'revert' => [
  490. 'location' => 'query',
  491. 'type' => 'boolean',
  492. ],
  493. ],
  494. ],'publish' => [
  495. 'path' => 'v3/blogs/{blogId}/pages/{pageId}/publish',
  496. 'httpMethod' => 'POST',
  497. 'parameters' => [
  498. 'blogId' => [
  499. 'location' => 'path',
  500. 'type' => 'string',
  501. 'required' => true,
  502. ],
  503. 'pageId' => [
  504. 'location' => 'path',
  505. 'type' => 'string',
  506. 'required' => true,
  507. ],
  508. ],
  509. ],'revert' => [
  510. 'path' => 'v3/blogs/{blogId}/pages/{pageId}/revert',
  511. 'httpMethod' => 'POST',
  512. 'parameters' => [
  513. 'blogId' => [
  514. 'location' => 'path',
  515. 'type' => 'string',
  516. 'required' => true,
  517. ],
  518. 'pageId' => [
  519. 'location' => 'path',
  520. 'type' => 'string',
  521. 'required' => true,
  522. ],
  523. ],
  524. ],'update' => [
  525. 'path' => 'v3/blogs/{blogId}/pages/{pageId}',
  526. 'httpMethod' => 'PUT',
  527. 'parameters' => [
  528. 'blogId' => [
  529. 'location' => 'path',
  530. 'type' => 'string',
  531. 'required' => true,
  532. ],
  533. 'pageId' => [
  534. 'location' => 'path',
  535. 'type' => 'string',
  536. 'required' => true,
  537. ],
  538. 'publish' => [
  539. 'location' => 'query',
  540. 'type' => 'boolean',
  541. ],
  542. 'revert' => [
  543. 'location' => 'query',
  544. 'type' => 'boolean',
  545. ],
  546. ],
  547. ],
  548. ]
  549. ]
  550. );
  551. $this->postUserInfos = new Blogger\Resource\PostUserInfos(
  552. $this,
  553. $this->serviceName,
  554. 'postUserInfos',
  555. [
  556. 'methods' => [
  557. 'get' => [
  558. 'path' => 'v3/users/{userId}/blogs/{blogId}/posts/{postId}',
  559. 'httpMethod' => 'GET',
  560. 'parameters' => [
  561. 'userId' => [
  562. 'location' => 'path',
  563. 'type' => 'string',
  564. 'required' => true,
  565. ],
  566. 'blogId' => [
  567. 'location' => 'path',
  568. 'type' => 'string',
  569. 'required' => true,
  570. ],
  571. 'postId' => [
  572. 'location' => 'path',
  573. 'type' => 'string',
  574. 'required' => true,
  575. ],
  576. 'maxComments' => [
  577. 'location' => 'query',
  578. 'type' => 'integer',
  579. ],
  580. ],
  581. ],'list' => [
  582. 'path' => 'v3/users/{userId}/blogs/{blogId}/posts',
  583. 'httpMethod' => 'GET',
  584. 'parameters' => [
  585. 'userId' => [
  586. 'location' => 'path',
  587. 'type' => 'string',
  588. 'required' => true,
  589. ],
  590. 'blogId' => [
  591. 'location' => 'path',
  592. 'type' => 'string',
  593. 'required' => true,
  594. ],
  595. 'endDate' => [
  596. 'location' => 'query',
  597. 'type' => 'string',
  598. ],
  599. 'fetchBodies' => [
  600. 'location' => 'query',
  601. 'type' => 'boolean',
  602. ],
  603. 'labels' => [
  604. 'location' => 'query',
  605. 'type' => 'string',
  606. ],
  607. 'maxResults' => [
  608. 'location' => 'query',
  609. 'type' => 'integer',
  610. ],
  611. 'orderBy' => [
  612. 'location' => 'query',
  613. 'type' => 'string',
  614. ],
  615. 'pageToken' => [
  616. 'location' => 'query',
  617. 'type' => 'string',
  618. ],
  619. 'startDate' => [
  620. 'location' => 'query',
  621. 'type' => 'string',
  622. ],
  623. 'status' => [
  624. 'location' => 'query',
  625. 'type' => 'string',
  626. 'repeated' => true,
  627. ],
  628. 'view' => [
  629. 'location' => 'query',
  630. 'type' => 'string',
  631. ],
  632. ],
  633. ],
  634. ]
  635. ]
  636. );
  637. $this->posts = new Blogger\Resource\Posts(
  638. $this,
  639. $this->serviceName,
  640. 'posts',
  641. [
  642. 'methods' => [
  643. 'delete' => [
  644. 'path' => 'v3/blogs/{blogId}/posts/{postId}',
  645. 'httpMethod' => 'DELETE',
  646. 'parameters' => [
  647. 'blogId' => [
  648. 'location' => 'path',
  649. 'type' => 'string',
  650. 'required' => true,
  651. ],
  652. 'postId' => [
  653. 'location' => 'path',
  654. 'type' => 'string',
  655. 'required' => true,
  656. ],
  657. 'useTrash' => [
  658. 'location' => 'query',
  659. 'type' => 'boolean',
  660. ],
  661. ],
  662. ],'get' => [
  663. 'path' => 'v3/blogs/{blogId}/posts/{postId}',
  664. 'httpMethod' => 'GET',
  665. 'parameters' => [
  666. 'blogId' => [
  667. 'location' => 'path',
  668. 'type' => 'string',
  669. 'required' => true,
  670. ],
  671. 'postId' => [
  672. 'location' => 'path',
  673. 'type' => 'string',
  674. 'required' => true,
  675. ],
  676. 'fetchBody' => [
  677. 'location' => 'query',
  678. 'type' => 'boolean',
  679. ],
  680. 'fetchImages' => [
  681. 'location' => 'query',
  682. 'type' => 'boolean',
  683. ],
  684. 'maxComments' => [
  685. 'location' => 'query',
  686. 'type' => 'integer',
  687. ],
  688. 'view' => [
  689. 'location' => 'query',
  690. 'type' => 'string',
  691. ],
  692. ],
  693. ],'getByPath' => [
  694. 'path' => 'v3/blogs/{blogId}/posts/bypath',
  695. 'httpMethod' => 'GET',
  696. 'parameters' => [
  697. 'blogId' => [
  698. 'location' => 'path',
  699. 'type' => 'string',
  700. 'required' => true,
  701. ],
  702. 'path' => [
  703. 'location' => 'query',
  704. 'type' => 'string',
  705. 'required' => true,
  706. ],
  707. 'maxComments' => [
  708. 'location' => 'query',
  709. 'type' => 'integer',
  710. ],
  711. 'view' => [
  712. 'location' => 'query',
  713. 'type' => 'string',
  714. ],
  715. ],
  716. ],'insert' => [
  717. 'path' => 'v3/blogs/{blogId}/posts',
  718. 'httpMethod' => 'POST',
  719. 'parameters' => [
  720. 'blogId' => [
  721. 'location' => 'path',
  722. 'type' => 'string',
  723. 'required' => true,
  724. ],
  725. 'fetchBody' => [
  726. 'location' => 'query',
  727. 'type' => 'boolean',
  728. ],
  729. 'fetchImages' => [
  730. 'location' => 'query',
  731. 'type' => 'boolean',
  732. ],
  733. 'isDraft' => [
  734. 'location' => 'query',
  735. 'type' => 'boolean',
  736. ],
  737. ],
  738. ],'list' => [
  739. 'path' => 'v3/blogs/{blogId}/posts',
  740. 'httpMethod' => 'GET',
  741. 'parameters' => [
  742. 'blogId' => [
  743. 'location' => 'path',
  744. 'type' => 'string',
  745. 'required' => true,
  746. ],
  747. 'endDate' => [
  748. 'location' => 'query',
  749. 'type' => 'string',
  750. ],
  751. 'fetchBodies' => [
  752. 'location' => 'query',
  753. 'type' => 'boolean',
  754. ],
  755. 'fetchImages' => [
  756. 'location' => 'query',
  757. 'type' => 'boolean',
  758. ],
  759. 'labels' => [
  760. 'location' => 'query',
  761. 'type' => 'string',
  762. ],
  763. 'maxResults' => [
  764. 'location' => 'query',
  765. 'type' => 'integer',
  766. ],
  767. 'orderBy' => [
  768. 'location' => 'query',
  769. 'type' => 'string',
  770. ],
  771. 'pageToken' => [
  772. 'location' => 'query',
  773. 'type' => 'string',
  774. ],
  775. 'sortOption' => [
  776. 'location' => 'query',
  777. 'type' => 'string',
  778. ],
  779. 'startDate' => [
  780. 'location' => 'query',
  781. 'type' => 'string',
  782. ],
  783. 'status' => [
  784. 'location' => 'query',
  785. 'type' => 'string',
  786. 'repeated' => true,
  787. ],
  788. 'view' => [
  789. 'location' => 'query',
  790. 'type' => 'string',
  791. ],
  792. ],
  793. ],'patch' => [
  794. 'path' => 'v3/blogs/{blogId}/posts/{postId}',
  795. 'httpMethod' => 'PATCH',
  796. 'parameters' => [
  797. 'blogId' => [
  798. 'location' => 'path',
  799. 'type' => 'string',
  800. 'required' => true,
  801. ],
  802. 'postId' => [
  803. 'location' => 'path',
  804. 'type' => 'string',
  805. 'required' => true,
  806. ],
  807. 'fetchBody' => [
  808. 'location' => 'query',
  809. 'type' => 'boolean',
  810. ],
  811. 'fetchImages' => [
  812. 'location' => 'query',
  813. 'type' => 'boolean',
  814. ],
  815. 'maxComments' => [
  816. 'location' => 'query',
  817. 'type' => 'integer',
  818. ],
  819. 'publish' => [
  820. 'location' => 'query',
  821. 'type' => 'boolean',
  822. ],
  823. 'revert' => [
  824. 'location' => 'query',
  825. 'type' => 'boolean',
  826. ],
  827. ],
  828. ],'publish' => [
  829. 'path' => 'v3/blogs/{blogId}/posts/{postId}/publish',
  830. 'httpMethod' => 'POST',
  831. 'parameters' => [
  832. 'blogId' => [
  833. 'location' => 'path',
  834. 'type' => 'string',
  835. 'required' => true,
  836. ],
  837. 'postId' => [
  838. 'location' => 'path',
  839. 'type' => 'string',
  840. 'required' => true,
  841. ],
  842. 'publishDate' => [
  843. 'location' => 'query',
  844. 'type' => 'string',
  845. ],
  846. ],
  847. ],'revert' => [
  848. 'path' => 'v3/blogs/{blogId}/posts/{postId}/revert',
  849. 'httpMethod' => 'POST',
  850. 'parameters' => [
  851. 'blogId' => [
  852. 'location' => 'path',
  853. 'type' => 'string',
  854. 'required' => true,
  855. ],
  856. 'postId' => [
  857. 'location' => 'path',
  858. 'type' => 'string',
  859. 'required' => true,
  860. ],
  861. ],
  862. ],'search' => [
  863. 'path' => 'v3/blogs/{blogId}/posts/search',
  864. 'httpMethod' => 'GET',
  865. 'parameters' => [
  866. 'blogId' => [
  867. 'location' => 'path',
  868. 'type' => 'string',
  869. 'required' => true,
  870. ],
  871. 'q' => [
  872. 'location' => 'query',
  873. 'type' => 'string',
  874. 'required' => true,
  875. ],
  876. 'fetchBodies' => [
  877. 'location' => 'query',
  878. 'type' => 'boolean',
  879. ],
  880. 'orderBy' => [
  881. 'location' => 'query',
  882. 'type' => 'string',
  883. ],
  884. ],
  885. ],'update' => [
  886. 'path' => 'v3/blogs/{blogId}/posts/{postId}',
  887. 'httpMethod' => 'PUT',
  888. 'parameters' => [
  889. 'blogId' => [
  890. 'location' => 'path',
  891. 'type' => 'string',
  892. 'required' => true,
  893. ],
  894. 'postId' => [
  895. 'location' => 'path',
  896. 'type' => 'string',
  897. 'required' => true,
  898. ],
  899. 'fetchBody' => [
  900. 'location' => 'query',
  901. 'type' => 'boolean',
  902. ],
  903. 'fetchImages' => [
  904. 'location' => 'query',
  905. 'type' => 'boolean',
  906. ],
  907. 'maxComments' => [
  908. 'location' => 'query',
  909. 'type' => 'integer',
  910. ],
  911. 'publish' => [
  912. 'location' => 'query',
  913. 'type' => 'boolean',
  914. ],
  915. 'revert' => [
  916. 'location' => 'query',
  917. 'type' => 'boolean',
  918. ],
  919. ],
  920. ],
  921. ]
  922. ]
  923. );
  924. $this->users = new Blogger\Resource\Users(
  925. $this,
  926. $this->serviceName,
  927. 'users',
  928. [
  929. 'methods' => [
  930. 'get' => [
  931. 'path' => 'v3/users/{userId}',
  932. 'httpMethod' => 'GET',
  933. 'parameters' => [
  934. 'userId' => [
  935. 'location' => 'path',
  936. 'type' => 'string',
  937. 'required' => true,
  938. ],
  939. ],
  940. ],
  941. ]
  942. ]
  943. );
  944. }
  945. }
  946. // Adding a class alias for backwards compatibility with the previous class name.
  947. class_alias(Blogger::class, 'Google_Service_Blogger');