Google_Service_AdSenseHost_AccountsAdunits_Resource

The "adunits" collection of methods.

Defined (1)

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

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