Google_MediaServiceResource

The "media" collection of methods.

Defined (1)

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

/google-api-php-client/src/contrib/Google_PlusDomainsService.php  
  1. class Google_MediaServiceResource extends Google_ServiceResource { 
  2.  
  3. /** 
  4. * Add a new media item to an album. The current upload size limitations are 
  5. * 36MB for a photo and 1GB for a video. Uploads will not count against quota if 
  6. * photos are less than 2048 pixels on their longest side or videos are less 
  7. * than 15 minutes in length. (media.insert) 
  8. * @param string $userId The ID of the user to create the activity on behalf of. 
  9. * @param string $collection 
  10. * @param Google_Media $postBody 
  11. * @param array $optParams Optional parameters. 
  12. * @return Google_Media 
  13. */ 
  14. public function insert($userId, $collection, Google_Media $postBody, $optParams = array()) { 
  15. $params = array('userId' => $userId, 'collection' => $collection, 'postBody' => $postBody); 
  16. $params = array_merge($params, $optParams); 
  17. $data = $this->__call('insert', array($params)); 
  18. if ($this->useObjects()) { 
  19. return new Google_Media($data); 
  20. } else { 
  21. return $data;