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