Google_SearchServiceResource

The "search" collection of methods.

Defined (1)

The class is defined in the following location(s).

/google-api/src/contrib/Google_YouTubeService.php  
  1. class Google_SearchServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Returns a collection of search results that match the query parameters specified in the API 
  6. * request. By default, a search result set identifies matching video, channel, and playlist 
  7. * resources, but you can also configure queries to only retrieve a specific type of resource. 
  8. * (search.list) 
  9. * @param string $part The part parameter specifies a comma-separated list of one or more search resource properties that the API response will include. The part names that you can include in the parameter value are id and snippet. 
  10. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a search result, the snippet property contains other properties that identify the result's title, description, and so forth. If you set part=snippet, the API response will also contain all of those nested properties. 
  11. * @param array $optParams Optional parameters. 
  12. * @opt_param string channelId The channelId parameter indicates that the API response should only contain resources created by the channel 
  13. * @opt_param string channelType The channelType parameter lets you restrict a search to a particular type of channel. 
  14. * @opt_param bool forContentOwner The forContentOwner parameter restricts the search to only retrieve resources owned by the content owner specified by the onBehalfOfContentOwner parameter. The user must be authenticated as a CMS account linked to the specified content owner and onBehalfOfContentOwner must be provided. 
  15. * @opt_param bool forMine The forMine parameter restricts the search to only retrieve videos owned by the authenticated user. 
  16. * @opt_param string maxResults USE_DESCRIPTION --- channels:list:maxResults 
  17. * @opt_param string onBehalfOfContentOwner The onBehalfOfContentOwner parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner. 
  18. * @opt_param string order The order parameter specifies the method that will be used to order resources in the API response. 
  19. * @opt_param string pageToken USE_DESCRIPTION --- channels:list:pageToken 
  20. * @opt_param string publishedAfter The publishedAfter parameter indicates that the API response should only contain resources created after the specified time. The value is an RFC 3339 formatted date-time value (1970-01-01T00:00:00Z). 
  21. * @opt_param string publishedBefore The publishedBefore parameter indicates that the API response should only contain resources created before the specified time. The value is an RFC 3339 formatted date-time value (1970-01-01T00:00:00Z). 
  22. * @opt_param string q The q parameter specifies the query term to search for. 
  23. * @opt_param string regionCode The regionCode parameter instructs the API to return search results for the specified country. The parameter value is an ISO 3166-1 alpha-2 country code. 
  24. * @opt_param string relatedToVideoId The relatedToVideoId parameter retrieves a list of videos that are related to the video that the parameter value identifies. The parameter value must be set to a YouTube video ID and, if you are using this parameter, the type parameter must be set to video. 
  25. * @opt_param string safeSearch The safeSearch parameter indicates whether the search results should include restricted content as well as standard content. 
  26. * @opt_param string topicId The topicId parameter indicates that the API response should only contain resources associated with the specified topic. The value identifies a Freebase topic ID. 
  27. * @opt_param string type The type parameter restricts a search query to only retrieve a particular type of resource. 
  28. * @opt_param string videoCaption The videoCaption parameter indicates whether the API should filter video search results based on whether they have captions. 
  29. * @opt_param string videoCategoryId The videoCategoryId parameter filters video search results based on their category. 
  30. * @opt_param string videoDefinition The videoDefinition parameter lets you restrict a search to only include either high definition (HD) or standard definition (SD) videos. HD videos are available for playback in at least 720p, though higher resolutions, like 1080p, might also be available. 
  31. * @opt_param string videoDimension The videoDimension parameter lets you restrict a search to only retrieve 2D or 3D videos. 
  32. * @opt_param string videoDuration The videoDuration parameter filters video search results based on their duration. 
  33. * @opt_param string videoEmbeddable The videoEmbeddable parameter lets you to restrict a search to only videos that can be embedded into a webpage. 
  34. * @opt_param string videoLicense The videoLicense parameter filters search results to only include videos with a particular license. YouTube lets video uploaders choose to attach either the Creative Commons license or the standard YouTube license to each of their videos. 
  35. * @opt_param string videoSyndicated The videoSyndicated parameter lets you to restrict a search to only videos that can be played outside youtube.com. 
  36. * @opt_param string videoType The videoType parameter lets you restrict a search to a particular type of videos. 
  37. * @return Google_SearchListResponse 
  38. */ 
  39. public function listSearch($part, $optParams = array()) { 
  40. $params = array('part' => $part); 
  41. $params = array_merge($params, $optParams); 
  42. $data = $this->__call('list', array($params)); 
  43. if ($this->useObjects()) { 
  44. return new Google_SearchListResponse($data); 
  45. } else { 
  46. return $data;