All Downloads are FREE. Search and download functionalities are using the official Maven repository.

target.apidocs.com.google.api.services.adsense.v2.Adsense.Accounts.Adclients.Adunits.html Maven / Gradle / Ivy







Adsense.Accounts.Adclients.Adunits (AdSense Management API v2-rev20241211-2.0.0)












com.google.api.services.adsense.v2

Class Adsense.Accounts.Adclients.Adunits

  • java.lang.Object
    • com.google.api.services.adsense.v2.Adsense.Accounts.Adclients.Adunits
    • Constructor Detail

      • Adunits

        public Adunits()
    • Method Detail

      • create

        public Adsense.Accounts.Adclients.Adunits.Create create(String parent,
                                                                AdUnit content)
                                                         throws IOException
        Creates an ad unit. This method can be called only by a restricted set of projects, which are usually owned by [AdSense for Platforms](https://developers.google.com/adsense/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](/adsense/management/reference/rest/v2/accounts.adclients). For now, this method can only be used to create `DISPLAY` ad units. See: https://support.google.com/adsense/answer/9183566 Create a request for the method "adunits.create". This request holds the parameters needed by the adsense server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        parent - Required. Ad client to create an ad unit under. Format: accounts/{account}/adclients/{adclient}
        content - the AdUnit
        Returns:
        the request
        Throws:
        IOException
      • get

        public Adsense.Accounts.Adclients.Adunits.Get get(String name)
                                                   throws IOException
        Gets an ad unit from a specified account and ad client. Create a request for the method "adunits.get". This request holds the parameters needed by the adsense server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        name - Required. AdUnit to get information about. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit}
        Returns:
        the request
        Throws:
        IOException
      • getAdcode

        public Adsense.Accounts.Adclients.Adunits.GetAdcode getAdcode(String name)
                                                               throws IOException
        Gets the ad unit code for a given ad unit. For more information, see [About the AdSense code](https://support.google.com/adsense/answer/9274634) and [Where to place the ad code in your HTML](https://support.google.com/adsense/answer/9190028). Create a request for the method "adunits.getAdcode". This request holds the parameters needed by the adsense server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        name - Required. Name of the adunit for which to get the adcode. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit}
        Returns:
        the request
        Throws:
        IOException
      • list

        public Adsense.Accounts.Adclients.Adunits.List list(String parent)
                                                     throws IOException
        Lists all ad units under a specified account and ad client. Create a request for the method "adunits.list". This request holds the parameters needed by the adsense server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        parent - Required. The ad client which owns the collection of ad units. Format: accounts/{account}/adclients/{adclient}
        Returns:
        the request
        Throws:
        IOException
      • listLinkedCustomChannels

        public Adsense.Accounts.Adclients.Adunits.ListLinkedCustomChannels listLinkedCustomChannels(String parent)
                                                                                             throws IOException
        Lists all the custom channels available for an ad unit. Create a request for the method "adunits.listLinkedCustomChannels". This request holds the parameters needed by the adsense server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        parent - Required. The ad unit which owns the collection of custom channels. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit}
        Returns:
        the request
        Throws:
        IOException
      • patch

        public Adsense.Accounts.Adclients.Adunits.Patch patch(String name,
                                                              AdUnit content)
                                                       throws IOException
        Updates an ad unit. This method can be called only by a restricted set of projects, which are usually owned by [AdSense for Platforms](https://developers.google.com/adsense/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 Create a request for the method "adunits.patch". This request holds the parameters needed by the adsense server. After setting any optional parameters, call the AbstractGoogleClientRequest.execute() method to invoke the remote operation.
        Parameters:
        name - Output only. Resource name of the ad unit. Format: accounts/{account}/adclients/{adclient}/adunits/{adunit}
        content - the AdUnit
        Returns:
        the request
        Throws:
        IOException

Copyright © 2011–2024 Google. All rights reserved.





© 2015 - 2025 Weber Informatics LLC | Privacy Policy