AccountsAdclientsAdunits
class AccountsAdclientsAdunits extends Resource (View source)
The "adunits" collection of methods.
Typical usage is:
$adsenseService = new Google\Service\Adsense(...);
$adunits = $adsenseService->accounts_adclients_adunits;
Methods
Creates an ad unit. This method can be called only by a restricted set of projects, which are usually owned by AdSense for Platforms publishers.
Gets an ad unit from a specified account and ad client. (adunits.get)
Gets the ad unit code for a given ad unit. For more information, see About the AdSense code and Where to place the ad code in your HTML. (adunits.getAdcode)
Lists all ad units under a specified account and ad client.
Lists all the custom channels available for an ad unit.
Updates an ad unit. This method can be called only by a restricted set of projects, which are usually owned by AdSense for Platforms publishers.
Details
AdUnit
create(string $parent, AdUnit $postBody, array $optParams = [])
Creates an ad unit. This method can be called only by a restricted set of projects, which are usually owned by AdSense for Platforms publishers.
Contact your account manager if you need to use this method. Note that ad
units can only be created for ad clients with an "AFC" product code. For more
info see the AdClient
resource. For now,
this method can only be used to create DISPLAY
ad units. See:
https://support.google.com/adsense/answer/9183566 (adunits.create)
AdUnit
get(string $name, array $optParams = [])
Gets an ad unit from a specified account and ad client. (adunits.get)
AdUnitAdCode
getAdcode(string $name, array $optParams = [])
Gets the ad unit code for a given ad unit. For more information, see About the AdSense code and Where to place the ad code in your HTML. (adunits.getAdcode)
ListAdUnitsResponse
listAccountsAdclientsAdunits(string $parent, array $optParams = [])
Lists all ad units under a specified account and ad client.
(adunits.listAccountsAdclientsAdunits)
ListLinkedCustomChannelsResponse
listLinkedCustomChannels(string $parent, array $optParams = [])
Lists all the custom channels available for an ad unit.
(adunits.listLinkedCustomChannels)
AdUnit
patch(string $name, AdUnit $postBody, array $optParams = [])
Updates an ad unit. This method can be called only by a restricted set of projects, which are usually owned by AdSense for Platforms publishers.
Contact your account manager if you need to use this method. For now, this
method can only be used to update DISPLAY
ad units. See:
https://support.google.com/adsense/answer/9183566 (adunits.patch)