Google_CreativesServiceResource

The "creatives" collection of methods.

Defined (1)

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

/inc/google-api-php-client/src/contrib/Google_AdexchangebuyerService.php  
  1. class Google_CreativesServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Submit a new creative. (creatives.insert) 
  6. * @param Google_Creative $postBody 
  7. * @param array $optParams Optional parameters. 
  8. * @return Google_Creative 
  9. */ 
  10. public function insert(Google_Creative $postBody, $optParams = array()) { 
  11. $params = array('postBody' => $postBody); 
  12. $params = array_merge($params, $optParams); 
  13. $data = $this->__call('insert', array($params)); 
  14. if ($this->useObjects()) { 
  15. return new Google_Creative($data); 
  16. } else { 
  17. return $data; 
  18. /** 
  19. * Retrieves a list of the authenticated user's active creatives. (creatives.list) 
  20. * @param array $optParams Optional parameters. 
  21. * @opt_param string pageToken A continuation token, used to page through ad clients. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. Optional. 
  22. * @opt_param string maxResults Maximum number of entries returned on one result page. If not set, the default is 100. Optional. 
  23. * @return Google_CreativesList 
  24. */ 
  25. public function listCreatives($optParams = array()) { 
  26. $params = array(); 
  27. $params = array_merge($params, $optParams); 
  28. $data = $this->__call('list', array($params)); 
  29. if ($this->useObjects()) { 
  30. return new Google_CreativesList($data); 
  31. } else { 
  32. return $data; 
  33. /** 
  34. * Gets the status for a single creative. (creatives.get) 
  35. * @param int $accountId The id for the account that will serve this creative. 
  36. * @param string $buyerCreativeId The buyer-specific id for this creative. 
  37. * @param string $adgroupId The adgroup this creative belongs to. 
  38. * @param array $optParams Optional parameters. 
  39. * @return Google_Creative 
  40. */ 
  41. public function get($accountId, $buyerCreativeId, $adgroupId, $optParams = array()) { 
  42. $params = array('accountId' => $accountId, 'buyerCreativeId' => $buyerCreativeId, 'adgroupId' => $adgroupId); 
  43. $params = array_merge($params, $optParams); 
  44. $data = $this->__call('get', array($params)); 
  45. if ($this->useObjects()) { 
  46. return new Google_Creative($data); 
  47. } else { 
  48. return $data;