source: vendor/google/apiclient-services/src/Blogger/Resource/Blogs.php

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

Upload project files

  • Property mode set to 100644
File size: 2.5 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\Blog;
21use Google\Service\Blogger\BlogList;
22
23/**
24 * The "blogs" collection of methods.
25 * Typical usage is:
26 * <code>
27 * $bloggerService = new Google\Service\Blogger(...);
28 * $blogs = $bloggerService->blogs;
29 * </code>
30 */
31class Blogs extends \Google\Service\Resource
32{
33 /**
34 * Gets a blog by id. (blogs.get)
35 *
36 * @param string $blogId
37 * @param array $optParams Optional parameters.
38 *
39 * @opt_param string maxPosts
40 * @opt_param string view
41 * @return Blog
42 * @throws \Google\Service\Exception
43 */
44 public function get($blogId, $optParams = [])
45 {
46 $params = ['blogId' => $blogId];
47 $params = array_merge($params, $optParams);
48 return $this->call('get', [$params], Blog::class);
49 }
50 /**
51 * Gets a blog by url. (blogs.getByUrl)
52 *
53 * @param string $url
54 * @param array $optParams Optional parameters.
55 *
56 * @opt_param string view
57 * @return Blog
58 * @throws \Google\Service\Exception
59 */
60 public function getByUrl($url, $optParams = [])
61 {
62 $params = ['url' => $url];
63 $params = array_merge($params, $optParams);
64 return $this->call('getByUrl', [$params], Blog::class);
65 }
66 /**
67 * Lists blogs by user. (blogs.listByUser)
68 *
69 * @param string $userId
70 * @param array $optParams Optional parameters.
71 *
72 * @opt_param bool fetchUserInfo
73 * @opt_param string role
74 * @opt_param string status Default value of status is LIVE.
75 * @opt_param string view
76 * @return BlogList
77 * @throws \Google\Service\Exception
78 */
79 public function listByUser($userId, $optParams = [])
80 {
81 $params = ['userId' => $userId];
82 $params = array_merge($params, $optParams);
83 return $this->call('listByUser', [$params], BlogList::class);
84 }
85}
86
87// Adding a class alias for backwards compatibility with the previous class name.
88class_alias(Blogs::class, 'Google_Service_Blogger_Resource_Blogs');
Note: See TracBrowser for help on using the repository browser.