Google_AccountsAdunitsServiceResource

The "adunits" collection of methods.

Defined (2)

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

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