Google_MediaServiceResource
The "media" collection of methods.
Defined (1)
The class is defined in the following location(s).
- /src/contrib/Google_PlusDomainsService.php
- class Google_MediaServiceResource extends Google_ServiceResource {
- /**
- * Add a new media item to an album. The current upload size limitations are
- * 36MB for a photo and 1GB for a video. Uploads will not count against quota if
- * photos are less than 2048 pixels on their longest side or videos are less
- * than 15 minutes in length. (media.insert)
- *
- * @param string $userId The ID of the user to create the activity on behalf of.
- * @param string $collection
- * @param Google_Media $postBody
- * @param array $optParams Optional parameters.
- * @return Google_Media
- */
- public function insert($userId, $collection, Google_Media $postBody, $optParams = array()) {
- $params = array('userId' => $userId, 'collection' => $collection, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('insert', array($params));
- if ($this->useObjects()) {
- return new Google_Media($data);
- } else {
- return $data;
- }
- }
- }