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 18/** 19 * The "commentThreads" collection of methods. 20 * Typical usage is: 21 * <code> 22 * $youtubeService = new Google_Service_YouTube(...); 23 * $commentThreads = $youtubeService->commentThreads; 24 * </code> 25 */ 26class Google_Service_YouTube_Resource_CommentThreads extends Google_Service_Resource 27{ 28 /** 29 * Inserts a new resource into this collection. (commentThreads.insert) 30 * 31 * @param string|array $part The *part* parameter identifies the properties that 32 * the API response will include. Set the parameter value to snippet. The 33 * snippet part has a quota cost of 2 units. 34 * @param Google_Service_YouTube_CommentThread $postBody 35 * @param array $optParams Optional parameters. 36 * @return Google_Service_YouTube_CommentThread 37 */ 38 public function insert($part, Google_Service_YouTube_CommentThread $postBody, $optParams = array()) 39 { 40 $params = array('part' => $part, 'postBody' => $postBody); 41 $params = array_merge($params, $optParams); 42 return $this->call('insert', array($params), "Google_Service_YouTube_CommentThread"); 43 } 44 /** 45 * Retrieves a list of resources, possibly filtered. 46 * (commentThreads.listCommentThreads) 47 * 48 * @param string|array $part The *part* parameter specifies a comma-separated 49 * list of one or more commentThread resource properties that the API response 50 * will include. 51 * @param array $optParams Optional parameters. 52 * 53 * @opt_param string allThreadsRelatedToChannelId Returns the comment threads of 54 * all videos of the channel and the channel comments as well. 55 * @opt_param string channelId Returns the comment threads for all the channel 56 * comments (ie does not include comments left on videos). 57 * @opt_param string id Returns the comment threads with the given IDs for 58 * Stubby or Apiary. 59 * @opt_param string maxResults The *maxResults* parameter specifies the maximum 60 * number of items that should be returned in the result set. 61 * @opt_param string moderationStatus Limits the returned comment threads to 62 * those with the specified moderation status. Not compatible with the 'id' 63 * filter. Valid values: published, heldForReview, likelySpam. 64 * @opt_param string order 65 * @opt_param string pageToken The *pageToken* parameter identifies a specific 66 * page in the result set that should be returned. In an API response, the 67 * nextPageToken and prevPageToken properties identify other pages that could be 68 * retrieved. 69 * @opt_param string searchTerms Limits the returned comment threads to those 70 * matching the specified key words. Not compatible with the 'id' filter. 71 * @opt_param string textFormat The requested text format for the returned 72 * comments. 73 * @opt_param string videoId Returns the comment threads of the specified video. 74 * @return Google_Service_YouTube_CommentThreadListResponse 75 */ 76 public function listCommentThreads($part, $optParams = array()) 77 { 78 $params = array('part' => $part); 79 $params = array_merge($params, $optParams); 80 return $this->call('list', array($params), "Google_Service_YouTube_CommentThreadListResponse"); 81 } 82 /** 83 * Updates an existing resource. (commentThreads.update) 84 * 85 * @param string|array $part The *part* parameter specifies a comma-separated 86 * list of commentThread resource properties that the API response will include. 87 * You must at least include the snippet part in the parameter value since that 88 * part contains all of the properties that the API request can update. 89 * @param Google_Service_YouTube_CommentThread $postBody 90 * @param array $optParams Optional parameters. 91 * @return Google_Service_YouTube_CommentThread 92 */ 93 public function update($part, Google_Service_YouTube_CommentThread $postBody, $optParams = array()) 94 { 95 $params = array('part' => $part, 'postBody' => $postBody); 96 $params = array_merge($params, $optParams); 97 return $this->call('update', array($params), "Google_Service_YouTube_CommentThread"); 98 } 99} 100