Google_AccountsAdunitsServiceResource

The "adunits" collection of methods.

Defined (2)

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

/src/contrib/Google_AdsensehostService.php  
  1. class Google_AccountsAdunitsServiceResource extends Google_ServiceResource { 
  2.  
  3. /** 
  4. * Delete the specified ad unit from the specified publisher AdSense account. (adunits.delete) 
  5. * @param string $accountId Account which contains the ad unit. 
  6. * @param string $adClientId Ad client for which to get ad unit. 
  7. * @param string $adUnitId Ad unit to delete. 
  8. * @param array $optParams Optional parameters. 
  9. * @return Google_AdUnit 
  10. */ 
  11. public function delete($accountId, $adClientId, $adUnitId, $optParams = array()) { 
  12. $params = array('accountId' => $accountId, 'adClientId' => $adClientId, 'adUnitId' => $adUnitId); 
  13. $params = array_merge($params, $optParams); 
  14. $data = $this->__call('delete', array($params)); 
  15. if ($this->useObjects()) { 
  16. return new Google_AdUnit($data); 
  17. } else { 
  18. return $data; 
  19. /** 
  20. * Get the specified host ad unit in this AdSense account. (adunits.get) 
  21. * @param string $accountId Account which contains the ad unit. 
  22. * @param string $adClientId Ad client for which to get ad unit. 
  23. * @param string $adUnitId Ad unit to get. 
  24. * @param array $optParams Optional parameters. 
  25. * @return Google_AdUnit 
  26. */ 
  27. public function get($accountId, $adClientId, $adUnitId, $optParams = array()) { 
  28. $params = array('accountId' => $accountId, 'adClientId' => $adClientId, 'adUnitId' => $adUnitId); 
  29. $params = array_merge($params, $optParams); 
  30. $data = $this->__call('get', array($params)); 
  31. if ($this->useObjects()) { 
  32. return new Google_AdUnit($data); 
  33. } else { 
  34. return $data; 
  35. /** 
  36. * Get ad code for the specified ad unit, attaching the specified host custom channels. 
  37. * (adunits.getAdCode) 
  38. * @param string $accountId Account which contains the ad client. 
  39. * @param string $adClientId Ad client with contains the ad unit. 
  40. * @param string $adUnitId Ad unit to get the code for. 
  41. * @param array $optParams Optional parameters. 
  42. * @opt_param string hostCustomChannelId Host custom channel to attach to the ad code. 
  43. * @return Google_AdCode 
  44. */ 
  45. public function getAdCode($accountId, $adClientId, $adUnitId, $optParams = array()) { 
  46. $params = array('accountId' => $accountId, 'adClientId' => $adClientId, 'adUnitId' => $adUnitId); 
  47. $params = array_merge($params, $optParams); 
  48. $data = $this->__call('getAdCode', array($params)); 
  49. if ($this->useObjects()) { 
  50. return new Google_AdCode($data); 
  51. } else { 
  52. return $data; 
  53. /** 
  54. * Insert the supplied ad unit into the specified publisher AdSense account. (adunits.insert) 
  55. * @param string $accountId Account which will contain the ad unit. 
  56. * @param string $adClientId Ad client into which to insert the ad unit. 
  57. * @param Google_AdUnit $postBody 
  58. * @param array $optParams Optional parameters. 
  59. * @return Google_AdUnit 
  60. */ 
  61. public function insert($accountId, $adClientId, Google_AdUnit $postBody, $optParams = array()) { 
  62. $params = array('accountId' => $accountId, 'adClientId' => $adClientId, 'postBody' => $postBody); 
  63. $params = array_merge($params, $optParams); 
  64. $data = $this->__call('insert', array($params)); 
  65. if ($this->useObjects()) { 
  66. return new Google_AdUnit($data); 
  67. } else { 
  68. return $data; 
  69. /** 
  70. * List all ad units in the specified publisher's AdSense account. (adunits.list) 
  71. * @param string $accountId Account which contains the ad client. 
  72. * @param string $adClientId Ad client for which to list ad units. 
  73. * @param array $optParams Optional parameters. 
  74. * @opt_param bool includeInactive Whether to include inactive ad units. Default: true. 
  75. * @opt_param string maxResults The maximum number of ad units to include in the response, used for paging. 
  76. * @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. 
  77. * @return Google_AdUnits 
  78. */ 
  79. public function listAccountsAdunits($accountId, $adClientId, $optParams = array()) { 
  80. $params = array('accountId' => $accountId, 'adClientId' => $adClientId); 
  81. $params = array_merge($params, $optParams); 
  82. $data = $this->__call('list', array($params)); 
  83. if ($this->useObjects()) { 
  84. return new Google_AdUnits($data); 
  85. } else { 
  86. return $data; 
  87. /** 
  88. * Update the supplied ad unit in the specified publisher AdSense account. This method supports 
  89. * patch semantics. (adunits.patch) 
  90. * @param string $accountId Account which contains the ad client. 
  91. * @param string $adClientId Ad client which contains the ad unit. 
  92. * @param string $adUnitId Ad unit to get. 
  93. * @param Google_AdUnit $postBody 
  94. * @param array $optParams Optional parameters. 
  95. * @return Google_AdUnit 
  96. */ 
  97. public function patch($accountId, $adClientId, $adUnitId, Google_AdUnit $postBody, $optParams = array()) { 
  98. $params = array('accountId' => $accountId, 'adClientId' => $adClientId, 'adUnitId' => $adUnitId, 'postBody' => $postBody); 
  99. $params = array_merge($params, $optParams); 
  100. $data = $this->__call('patch', array($params)); 
  101. if ($this->useObjects()) { 
  102. return new Google_AdUnit($data); 
  103. } else { 
  104. return $data; 
  105. /** 
  106. * Update the supplied ad unit in the specified publisher AdSense account. (adunits.update) 
  107. * @param string $accountId Account which contains the ad client. 
  108. * @param string $adClientId Ad client which contains the ad unit. 
  109. * @param Google_AdUnit $postBody 
  110. * @param array $optParams Optional parameters. 
  111. * @return Google_AdUnit 
  112. */ 
  113. public function update($accountId, $adClientId, Google_AdUnit $postBody, $optParams = array()) { 
  114. $params = array('accountId' => $accountId, 'adClientId' => $adClientId, 'postBody' => $postBody); 
  115. $params = array_merge($params, $optParams); 
  116. $data = $this->__call('update', array($params)); 
  117. if ($this->useObjects()) { 
  118. return new Google_AdUnit($data); 
  119. } else { 
  120. return $data; 
/src/contrib/Google_AdSenseService.php  
  1. class Google_AccountsAdunitsServiceResource extends Google_ServiceResource { 
  2.  
  3. /** 
  4. * Gets the specified ad unit in the specified ad client for the specified account. (adunits.get) 
  5. * @param string $accountId Account to which the ad client belongs. 
  6. * @param string $adClientId Ad client for which to get the ad unit. 
  7. * @param string $adUnitId Ad unit to retrieve. 
  8. * @param array $optParams Optional parameters. 
  9. * @return Google_AdUnit 
  10. */ 
  11. public function get($accountId, $adClientId, $adUnitId, $optParams = array()) { 
  12. $params = array('accountId' => $accountId, 'adClientId' => $adClientId, 'adUnitId' => $adUnitId); 
  13. $params = array_merge($params, $optParams); 
  14. $data = $this->__call('get', array($params)); 
  15. if ($this->useObjects()) { 
  16. return new Google_AdUnit($data); 
  17. } else { 
  18. return $data; 
  19. /** 
  20. * Get ad code for the specified ad unit. (adunits.getAdCode) 
  21. * @param string $accountId Account which contains the ad client. 
  22. * @param string $adClientId Ad client with contains the ad unit. 
  23. * @param string $adUnitId Ad unit to get the code for. 
  24. * @param array $optParams Optional parameters. 
  25. * @return Google_AdCode 
  26. */ 
  27. public function getAdCode($accountId, $adClientId, $adUnitId, $optParams = array()) { 
  28. $params = array('accountId' => $accountId, 'adClientId' => $adClientId, 'adUnitId' => $adUnitId); 
  29. $params = array_merge($params, $optParams); 
  30. $data = $this->__call('getAdCode', array($params)); 
  31. if ($this->useObjects()) { 
  32. return new Google_AdCode($data); 
  33. } else { 
  34. return $data; 
  35. /** 
  36. * List all ad units in the specified ad client for the specified account. (adunits.list) 
  37. * @param string $accountId Account to which the ad client belongs. 
  38. * @param string $adClientId Ad client for which to list ad units. 
  39. * @param array $optParams Optional parameters. 
  40. * @opt_param bool includeInactive Whether to include inactive ad units. Default: true. 
  41. * @opt_param int maxResults The maximum number of ad units to include in the response, used for paging. 
  42. * @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. 
  43. * @return Google_AdUnits 
  44. */ 
  45. public function listAccountsAdunits($accountId, $adClientId, $optParams = array()) { 
  46. $params = array('accountId' => $accountId, 'adClientId' => $adClientId); 
  47. $params = array_merge($params, $optParams); 
  48. $data = $this->__call('list', array($params)); 
  49. if ($this->useObjects()) { 
  50. return new Google_AdUnits($data); 
  51. } else { 
  52. return $data;