Google_Service_AdSense_Adunits_Resource

The "adunits" collection of methods.

Defined (1)

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

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