Google_Service_YouTube_Search_Resource

The "search" collection of methods.

Defined (1)

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

/src/Google/Service/YouTube.php  
  1. class Google_Service_YouTube_Search_Resource extends Google_Service_Resource 
  2.  
  3. /** 
  4. * Returns a collection of search results that match the query parameters 
  5. * specified in the API request. By default, a search result set identifies 
  6. * matching video, channel, and playlist resources, but you can also configure 
  7. * queries to only retrieve a specific type of resource. (search.listSearch) 
  8. * @param string $part The part parameter specifies a comma-separated list of 
  9. * one or more search resource properties that the API response will include. 
  10. * The part names that you can include in the parameter value are id and 
  11. * snippet. 
  12. * If the parameter identifies a property that contains child properties, the 
  13. * child properties will be included in the response. For example, in a search 
  14. * result, the snippet property contains other properties that identify the 
  15. * result's title, description, and so forth. If you set part=snippet, the API 
  16. * response will also contain all of those nested properties. 
  17. * @param array $optParams Optional parameters. 
  18. * @opt_param string eventType The eventType parameter restricts a search to 
  19. * broadcast events. 
  20. * @opt_param string channelId The channelId parameter indicates that the API 
  21. * response should only contain resources created by the channel 
  22. * @opt_param string videoSyndicated The videoSyndicated parameter lets you to 
  23. * restrict a search to only videos that can be played outside youtube.com. 
  24. * @opt_param string channelType The channelType parameter lets you restrict a 
  25. * search to a particular type of channel. 
  26. * @opt_param string videoCaption The videoCaption parameter indicates whether 
  27. * the API should filter video search results based on whether they have 
  28. * captions. 
  29. * @opt_param string publishedAfter The publishedAfter parameter indicates that 
  30. * the API response should only contain resources created after the specified 
  31. * time. The value is an RFC 3339 formatted date-time value 
  32. * (1970-01-01T00:00:00Z). 
  33. * @opt_param string onBehalfOfContentOwner Note: This parameter is intended 
  34. * exclusively for YouTube content partners. 
  35. * The onBehalfOfContentOwner parameter indicates that the request's 
  36. * authorization credentials identify a YouTube CMS user who is acting on behalf 
  37. * of the content owner specified in the parameter value. This parameter is 
  38. * intended for YouTube content partners that own and manage many different 
  39. * YouTube channels. It allows content owners to authenticate once and get 
  40. * access to all their video and channel data, without having to provide 
  41. * authentication credentials for each individual channel. The CMS account that 
  42. * the user authenticates with must be linked to the specified YouTube content 
  43. * owner. 
  44. * @opt_param string pageToken The pageToken parameter identifies a specific 
  45. * page in the result set that should be returned. In an API response, the 
  46. * nextPageToken and prevPageToken properties identify other pages that could be 
  47. * retrieved. 
  48. * @opt_param bool forContentOwner Note: This parameter is intended exclusively 
  49. * for YouTube content partners. 
  50. * The forContentOwner parameter restricts the search to only retrieve resources 
  51. * owned by the content owner specified by the onBehalfOfContentOwner parameter. 
  52. * The user must be authenticated using a CMS account linked to the specified 
  53. * content owner and onBehalfOfContentOwner must be provided. 
  54. * @opt_param string regionCode The regionCode parameter instructs the API to 
  55. * return search results for the specified country. The parameter value is an 
  56. * ISO 3166-1 alpha-2 country code. 
  57. * @opt_param string location The location parameter restricts a search to 
  58. * videos that have a geographical location specified in their metadata. The 
  59. * value is a string that specifies geographic latitude/longitude coordinates 
  60. * e.g. (37.42307, -122.08427) 
  61. * @opt_param string locationRadius The locationRadius, in conjunction with the 
  62. * location parameter, defines a geographic area. If the geographic coordinates 
  63. * associated with a video fall within that area, then the video may be included 
  64. * in search results. This parameter value must be a floating point number 
  65. * followed by a measurement unit. Valid measurement units are m, km, ft, and 
  66. * mi. For example, valid parameter values include 1500m, 5km, 10000ft, and 
  67. * 0.75mi. The API does not support locationRadius parameter values larger than 
  68. * 1000 kilometers. 
  69. * @opt_param string videoType The videoType parameter lets you restrict a 
  70. * search to a particular type of videos. 
  71. * @opt_param string type The type parameter restricts a search query to only 
  72. * retrieve a particular type of resource. The value is a comma-separated list 
  73. * of resource types. 
  74. * @opt_param string topicId The topicId parameter indicates that the API 
  75. * response should only contain resources associated with the specified topic. 
  76. * The value identifies a Freebase topic ID. 
  77. * @opt_param string publishedBefore The publishedBefore parameter indicates 
  78. * that the API response should only contain resources created before the 
  79. * specified time. The value is an RFC 3339 formatted date-time value 
  80. * (1970-01-01T00:00:00Z). 
  81. * @opt_param string videoDimension The videoDimension parameter lets you 
  82. * restrict a search to only retrieve 2D or 3D videos. 
  83. * @opt_param string videoLicense The videoLicense parameter filters search 
  84. * results to only include videos with a particular license. YouTube lets video 
  85. * uploaders choose to attach either the Creative Commons license or the 
  86. * standard YouTube license to each of their videos. 
  87. * @opt_param string maxResults The maxResults parameter specifies the maximum 
  88. * number of items that should be returned in the result set. 
  89. * @opt_param string relatedToVideoId The relatedToVideoId parameter retrieves a 
  90. * list of videos that are related to the video that the parameter value 
  91. * identifies. The parameter value must be set to a YouTube video ID and, if you 
  92. * are using this parameter, the type parameter must be set to video. 
  93. * @opt_param string videoDefinition The videoDefinition parameter lets you 
  94. * restrict a search to only include either high definition (HD) or standard 
  95. * definition (SD) videos. HD videos are available for playback in at least 
  96. * 720p, though higher resolutions, like 1080p, might also be available. 
  97. * @opt_param string videoDuration The videoDuration parameter filters video 
  98. * search results based on their duration. 
  99. * @opt_param bool forMine The forMine parameter restricts the search to only 
  100. * retrieve videos owned by the authenticated user. If you set this parameter to 
  101. * true, then the type parameter's value must also be set to video. 
  102. * @opt_param string q The q parameter specifies the query term to search for. 
  103. * @opt_param string safeSearch The safeSearch parameter indicates whether the 
  104. * search results should include restricted content as well as standard content. 
  105. * @opt_param string videoEmbeddable The videoEmbeddable parameter lets you to 
  106. * restrict a search to only videos that can be embedded into a webpage. 
  107. * @opt_param string videoCategoryId The videoCategoryId parameter filters video 
  108. * search results based on their category. 
  109. * @opt_param string order The order parameter specifies the method that will be 
  110. * used to order resources in the API response. 
  111. * @return Google_Service_YouTube_SearchListResponse 
  112. */ 
  113. public function listSearch($part, $optParams = array()) 
  114. $params = array('part' => $part); 
  115. $params = array_merge($params, $optParams); 
  116. return $this->call('list', array($params), "Google_Service_YouTube_SearchListResponse");