GoogleGAL_Service_AdSense_AccountsAdunits_Resource

The "adunits" collection of methods.

Defined (1)

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

/core/Google/Service/AdSense.php  
  1. class GoogleGAL_Service_AdSense_AccountsAdunits_Resource extends GoogleGAL_Service_Resource 
  2.  
  3. /** 
  4. * Gets the specified ad unit in the specified ad client for the specified 
  5. * account. (adunits.get) 
  6. * @param string $accountId Account to which the ad client belongs. 
  7. * @param string $adClientId Ad client for which to get the ad unit. 
  8. * @param string $adUnitId Ad unit to retrieve. 
  9. * @param array $optParams Optional parameters. 
  10. * @return GoogleGAL_Service_AdSense_AdUnit 
  11. */ 
  12. public function get($accountId, $adClientId, $adUnitId, $optParams = array()) 
  13. $params = array('accountId' => $accountId, 'adClientId' => $adClientId, 'adUnitId' => $adUnitId); 
  14. $params = array_merge($params, $optParams); 
  15. return $this->call('get', array($params), "GoogleGAL_Service_AdSense_AdUnit"); 
  16.  
  17. /** 
  18. * Get ad code for the specified ad unit. (adunits.getAdCode) 
  19. * @param string $accountId Account which contains the ad client. 
  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 GoogleGAL_Service_AdSense_AdCode 
  24. */ 
  25. public function getAdCode($accountId, $adClientId, $adUnitId, $optParams = array()) 
  26. $params = array('accountId' => $accountId, 'adClientId' => $adClientId, 'adUnitId' => $adUnitId); 
  27. $params = array_merge($params, $optParams); 
  28. return $this->call('getAdCode', array($params), "GoogleGAL_Service_AdSense_AdCode"); 
  29.  
  30. /** 
  31. * List all ad units in the specified ad client for the specified account. 
  32. * (adunits.listAccountsAdunits) 
  33. * @param string $accountId Account to which the ad client belongs. 
  34. * @param string $adClientId Ad client for which to list ad units. 
  35. * @param array $optParams Optional parameters. 
  36. * @opt_param bool includeInactive Whether to include inactive ad units. 
  37. * Default: true. 
  38. * @opt_param string pageToken A continuation token, used to page through ad 
  39. * units. To retrieve the next page, set this parameter to the value of 
  40. * "nextPageToken" from the previous response. 
  41. * @opt_param int maxResults The maximum number of ad units to include in the 
  42. * response, used for paging. 
  43. * @return GoogleGAL_Service_AdSense_AdUnits 
  44. */ 
  45. public function listAccountsAdunits($accountId, $adClientId, $optParams = array()) 
  46. $params = array('accountId' => $accountId, 'adClientId' => $adClientId); 
  47. $params = array_merge($params, $optParams); 
  48. return $this->call('list', array($params), "GoogleGAL_Service_AdSense_AdUnits");