class AccountsAdunits extends Resource (View source)

The "adunits" collection of methods.

Typical usage is:

 $adsensehostService = new Google\Service\AdSenseHost(...);
 $adunits = $adsensehostService->accounts_adunits;

Methods

delete(string $accountId, string $adClientId, string $adUnitId, array $optParams = [])

Delete the specified ad unit from the specified publisher AdSense account.

get(string $accountId, string $adClientId, string $adUnitId, array $optParams = [])

Get the specified host ad unit in this AdSense account. (adunits.get)

getAdCode(string $accountId, string $adClientId, string $adUnitId, array $optParams = [])

Get ad code for the specified ad unit, attaching the specified host custom channels. (adunits.getAdCode)

insert(string $accountId, string $adClientId, AdUnit $postBody, array $optParams = [])

Insert the supplied ad unit into the specified publisher AdSense account.

listAccountsAdunits(string $accountId, string $adClientId, array $optParams = [])

List all ad units in the specified publisher's AdSense account.

patch(string $accountId, string $adClientId, string $adUnitId, AdUnit $postBody, array $optParams = [])

Update the supplied ad unit in the specified publisher AdSense account. This method supports patch semantics. (adunits.patch)

update(string $accountId, string $adClientId, AdUnit $postBody, array $optParams = [])

Update the supplied ad unit in the specified publisher AdSense account.

Details

AdUnit delete(string $accountId, string $adClientId, string $adUnitId, array $optParams = [])

Delete the specified ad unit from the specified publisher AdSense account.

(adunits.delete)

Parameters

string $accountId

Account which contains the ad unit.

string $adClientId

Ad client for which to get ad unit.

string $adUnitId

Ad unit to delete.

array $optParams

Optional parameters.

Return Value

AdUnit

Exceptions

Exception

AdUnit get(string $accountId, string $adClientId, string $adUnitId, array $optParams = [])

Get the specified host ad unit in this AdSense account. (adunits.get)

Parameters

string $accountId

Account which contains the ad unit.

string $adClientId

Ad client for which to get ad unit.

string $adUnitId

Ad unit to get.

array $optParams

Optional parameters.

Return Value

AdUnit

Exceptions

Exception

AdCode getAdCode(string $accountId, string $adClientId, string $adUnitId, array $optParams = [])

Get ad code for the specified ad unit, attaching the specified host custom channels. (adunits.getAdCode)

Parameters

string $accountId

Account which contains the ad client.

string $adClientId

Ad client with contains the ad unit.

string $adUnitId

Ad unit to get the code for.

array $optParams

Optional parameters.

Return Value

AdCode

Exceptions

Exception

AdUnit insert(string $accountId, string $adClientId, AdUnit $postBody, array $optParams = [])

Insert the supplied ad unit into the specified publisher AdSense account.

(adunits.insert)

Parameters

string $accountId

Account which will contain the ad unit.

string $adClientId

Ad client into which to insert the ad unit.

AdUnit $postBody
array $optParams

Optional parameters.

Return Value

AdUnit

Exceptions

Exception

AdUnits listAccountsAdunits(string $accountId, string $adClientId, array $optParams = [])

List all ad units in the specified publisher's AdSense account.

(adunits.listAccountsAdunits)

Parameters

string $accountId

Account which contains the ad client.

string $adClientId

Ad client for which to list ad units.

array $optParams

Optional parameters.

Return Value

AdUnits

Exceptions

Exception

AdUnit patch(string $accountId, string $adClientId, string $adUnitId, AdUnit $postBody, array $optParams = [])

Update the supplied ad unit in the specified publisher AdSense account. This method supports patch semantics. (adunits.patch)

Parameters

string $accountId

Account which contains the ad client.

string $adClientId

Ad client which contains the ad unit.

string $adUnitId

Ad unit to get.

AdUnit $postBody
array $optParams

Optional parameters.

Return Value

AdUnit

Exceptions

Exception

AdUnit update(string $accountId, string $adClientId, AdUnit $postBody, array $optParams = [])

Update the supplied ad unit in the specified publisher AdSense account.

(adunits.update)

Parameters

string $accountId

Account which contains the ad client.

string $adClientId

Ad client which contains the ad unit.

AdUnit $postBody
array $optParams

Optional parameters.

Return Value

AdUnit

Exceptions

Exception