google_AdunitsServiceResource

The "adunits" collection of methods.

Defined (2)

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

/src/contrib/Google_AdExchangeSellerService.php  
  1. class google_AdunitsServiceResource extends Google_ServiceResource { 
  2.  
  3. /** 
  4. * Gets the specified ad unit in the specified ad client. (adunits.get) 
  5. * @param string $adClientId Ad client for which to get the ad unit. 
  6. * @param string $adUnitId Ad unit to retrieve. 
  7. * @param array $optParams Optional parameters. 
  8. * @return google_AdUnit 
  9. */ 
  10. public function get($adClientId, $adUnitId, $optParams = array()) { 
  11. $params = array('adClientId' => $adClientId, 'adUnitId' => $adUnitId); 
  12. $params = array_merge($params, $optParams); 
  13. $data = $this->__call('get', array($params)); 
  14. if ($this->useObjects()) { 
  15. return new google_AdUnit($data); 
  16. } else { 
  17. return $data; 
  18. /** 
  19. * List all ad units in the specified ad client for this Ad Exchange account. 
  20. * (adunits.list) 
  21. * @param string $adClientId Ad client for which to list ad units. 
  22. * @param array $optParams Optional parameters. 
  23. * @opt_param bool includeInactive Whether to include inactive ad units. Default: true. 
  24. * @opt_param string maxResults The maximum number of ad units to include in the response, used for paging. 
  25. * @opt_param string pageToken A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. 
  26. * @return google_AdUnits 
  27. */ 
  28. public function listAdunits($adClientId, $optParams = array()) { 
  29. $params = array('adClientId' => $adClientId); 
  30. $params = array_merge($params, $optParams); 
  31. $data = $this->__call('list', array($params)); 
  32. if ($this->useObjects()) { 
  33. return new google_AdUnits($data); 
  34. } else { 
  35. return $data; 
/src/contrib/Google_AdSenseService.php  
  1. class Google_AdunitsServiceResource extends Google_ServiceResource { 
  2.  
  3. /** 
  4. * Gets the specified ad unit in the specified ad client. (adunits.get) 
  5. * @param string $adClientId Ad client for which to get the ad unit. 
  6. * @param string $adUnitId Ad unit to retrieve. 
  7. * @param array $optParams Optional parameters. 
  8. * @return Google_AdUnit 
  9. */ 
  10. public function get($adClientId, $adUnitId, $optParams = array()) { 
  11. $params = array('adClientId' => $adClientId, 'adUnitId' => $adUnitId); 
  12. $params = array_merge($params, $optParams); 
  13. $data = $this->__call('get', array($params)); 
  14. if ($this->useObjects()) { 
  15. return new Google_AdUnit($data); 
  16. } else { 
  17. return $data; 
  18. /** 
  19. * Get ad code for the specified ad unit. (adunits.getAdCode) 
  20. * @param string $adClientId Ad client with contains the ad unit. 
  21. * @param string $adUnitId Ad unit to get the code for. 
  22. * @param array $optParams Optional parameters. 
  23. * @return Google_AdCode 
  24. */ 
  25. public function getAdCode($adClientId, $adUnitId, $optParams = array()) { 
  26. $params = array('adClientId' => $adClientId, 'adUnitId' => $adUnitId); 
  27. $params = array_merge($params, $optParams); 
  28. $data = $this->__call('getAdCode', array($params)); 
  29. if ($this->useObjects()) { 
  30. return new Google_AdCode($data); 
  31. } else { 
  32. return $data; 
  33. /** 
  34. * List all ad units in the specified ad client for this AdSense account. (adunits.list) 
  35. * @param string $adClientId Ad client for which to list ad units. 
  36. * @param array $optParams Optional parameters. 
  37. * @opt_param bool includeInactive Whether to include inactive ad units. Default: true. 
  38. * @opt_param int maxResults The maximum number of ad units to include in the response, used for paging. 
  39. * @opt_param string pageToken A continuation token, used to page through ad units. To retrieve the next page, set this parameter to the value of "nextPageToken" from the previous response. 
  40. * @return Google_AdUnits 
  41. */ 
  42. public function listAdunits($adClientId, $optParams = array()) { 
  43. $params = array('adClientId' => $adClientId); 
  44. $params = array_merge($params, $optParams); 
  45. $data = $this->__call('list', array($params)); 
  46. if ($this->useObjects()) { 
  47. return new Google_AdUnits($data); 
  48. } else { 
  49. return $data;