Google_Service_AdSenseHost_AccountsAdunits_Resource

The "adunits" collection of methods.

Defined (1)

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

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