Class AccountsResource.AdclientsResource.AdunitsResource
The "adunits" collection of methods.
Inherited Members
Namespace: Google.Apis.Adsense.v2
Assembly: Google.Apis.Adsense.v2.dll
Syntax
public class AccountsResource.AdclientsResource.AdunitsResource
Constructors
AdunitsResource(IClientService)
Constructs a new resource.
Declaration
public AdunitsResource(IClientService service)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service |
Methods
Create(AdUnit, string)
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
Declaration
public virtual AccountsResource.AdclientsResource.AdunitsResource.CreateRequest Create(AdUnit body, string parent)
Parameters
Type | Name | Description |
---|---|---|
AdUnit | body | The body of the request. |
string | parent | Required. Ad client to create an ad unit under. Format: accounts/{account}/adclients/{adclient} |
Returns
Type | Description |
---|---|
AccountsResource.AdclientsResource.AdunitsResource.CreateRequest |
Get(string)
Gets an ad unit from a specified account and ad client.
Declaration
public virtual AccountsResource.AdclientsResource.AdunitsResource.GetRequest Get(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. AdUnit to get information about. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit} |
Returns
Type | Description |
---|---|
AccountsResource.AdclientsResource.AdunitsResource.GetRequest |
GetAdcode(string)
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.
Declaration
public virtual AccountsResource.AdclientsResource.AdunitsResource.GetAdcodeRequest GetAdcode(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | Required. Name of the adunit for which to get the adcode. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit} |
Returns
Type | Description |
---|---|
AccountsResource.AdclientsResource.AdunitsResource.GetAdcodeRequest |
List(string)
Lists all ad units under a specified account and ad client.
Declaration
public virtual AccountsResource.AdclientsResource.AdunitsResource.ListRequest List(string parent)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The ad client which owns the collection of ad units. Format: accounts/{account}/adclients/{adclient} |
Returns
Type | Description |
---|---|
AccountsResource.AdclientsResource.AdunitsResource.ListRequest |
ListLinkedCustomChannels(string)
Lists all the custom channels available for an ad unit.
Declaration
public virtual AccountsResource.AdclientsResource.AdunitsResource.ListLinkedCustomChannelsRequest ListLinkedCustomChannels(string parent)
Parameters
Type | Name | Description |
---|---|---|
string | parent | Required. The ad unit which owns the collection of custom channels. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit} |
Returns
Type | Description |
---|---|
AccountsResource.AdclientsResource.AdunitsResource.ListLinkedCustomChannelsRequest |
Patch(AdUnit, string)
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
Declaration
public virtual AccountsResource.AdclientsResource.AdunitsResource.PatchRequest Patch(AdUnit body, string name)
Parameters
Type | Name | Description |
---|---|---|
AdUnit | body | The body of the request. |
string | name | Output only. Resource name of the ad unit. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit} |
Returns
Type | Description |
---|---|
AccountsResource.AdclientsResource.AdunitsResource.PatchRequest |