Google_Service_AdSense_Adunits_Resource

The "adunits" collection of methods.

Defined (1)

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

/includes/api-libs/Google/Service/AdSense.php  
  1. class Google_Service_AdSense_Adunits_Resource extends Google_Service_Resource 
  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_Service_AdSense_AdUnit 
  9. */ 
  10. public function get($adClientId, $adUnitId, $optParams = array()) 
  11. $params = array('adClientId' => $adClientId, 'adUnitId' => $adUnitId); 
  12. $params = array_merge($params, $optParams); 
  13. return $this->call('get', array($params), "Google_Service_AdSense_AdUnit"); 
  14.  
  15. /** 
  16. * Get ad code for the specified ad unit. (adunits.getAdCode) 
  17. * @param string $adClientId Ad client with contains the ad unit. 
  18. * @param string $adUnitId Ad unit to get the code for. 
  19. * @param array $optParams Optional parameters. 
  20. * @return Google_Service_AdSense_AdCode 
  21. */ 
  22. public function getAdCode($adClientId, $adUnitId, $optParams = array()) 
  23. $params = array('adClientId' => $adClientId, 'adUnitId' => $adUnitId); 
  24. $params = array_merge($params, $optParams); 
  25. return $this->call('getAdCode', array($params), "Google_Service_AdSense_AdCode"); 
  26.  
  27. /** 
  28. * List all ad units in the specified ad client for this AdSense account. 
  29. * (adunits.listAdunits) 
  30. * @param string $adClientId Ad client for which to list ad units. 
  31. * @param array $optParams Optional parameters. 
  32. * @opt_param bool includeInactive Whether to include inactive ad units. 
  33. * Default: true. 
  34. * @opt_param string pageToken A continuation token, used to page through ad 
  35. * units. To retrieve the next page, set this parameter to the value of 
  36. * "nextPageToken" from the previous response. 
  37. * @opt_param int maxResults The maximum number of ad units to include in the 
  38. * response, used for paging. 
  39. * @return Google_Service_AdSense_AdUnits 
  40. */ 
  41. public function listAdunits($adClientId, $optParams = array()) 
  42. $params = array('adClientId' => $adClientId); 
  43. $params = array_merge($params, $optParams); 
  44. return $this->call('list', array($params), "Google_Service_AdSense_AdUnits");