Wrapper class for the v13 SiteSuggestion service. This class is automatically generated.

Methods
G
N
Attributes
[R] api

Holds the AdWords::API object to which the wrapper belongs.

[R] module

Holds a shortcut to the parent module. Use this to avoid typing the full class name when creating classes belonging to this service, e.g.

 service_object.module::ClassName

instead of

 AdWords::V13::SiteSuggestionService::ClassName

This will make it easier to migrate your code between API versions.

Class Public methods
new(driver, api)

Constructor for SiteSuggestionServiceWrapper.

Args:

  • driver: SOAP::RPC::Driver object with the remote SOAP methods for this service
  • api: the AdWords::API object to which the wrapper belongs
# File lib/adwords4r/v13/SiteSuggestionServiceWrapper.rb, line 34
        def initialize(driver, api)
          @driver = driver
          @api = api
          @module = AdWords::V13::SiteSuggestionService
        end
Instance Public methods
getSitesByCategoryName(categoryName, targeting)

Calls the getSitesByCategoryName method of the SiteSuggestion service. Check the online documentation for this method.

Args:

Returns:

Raises: Error::ApiError (or a subclass thereof) if a SOAP fault occurs.

# File lib/adwords4r/v13/SiteSuggestionServiceWrapper.rb, line 53
        def getSitesByCategoryName(categoryName, targeting)
          begin
            AdWords::Service.validate_param('categoryName',
                categoryName, SOAP::SOAPString)
            AdWords::Service.validate_param('targeting',
                targeting, AdWords::V13::SiteSuggestionService::LanguageGeoTargeting)
            # Construct request object and make API call
            obj = AdWords::V13::SiteSuggestionService::GetSitesByCategoryName.new(categoryName, targeting)
            return @driver.getSitesByCategoryName(obj)
          rescue SOAP::FaultError => fault
            raise(AdWords::Error::create_specific_api_error(fault),
                "getSitesByCategoryName Call Failed: " + fault.faultstring.to_s, caller)
          end
        end
getSitesByDemographics(demo, targeting)

Calls the getSitesByDemographics method of the SiteSuggestion service. Check the online documentation for this method.

Args:

Returns:

Raises: Error::ApiError (or a subclass thereof) if a SOAP fault occurs.

# File lib/adwords4r/v13/SiteSuggestionServiceWrapper.rb, line 81
        def getSitesByDemographics(demo, targeting)
          begin
            AdWords::Service.validate_param('demo',
                demo, AdWords::V13::SiteSuggestionService::DemographicsTarget)
            AdWords::Service.validate_param('targeting',
                targeting, AdWords::V13::SiteSuggestionService::LanguageGeoTargeting)
            # Construct request object and make API call
            obj = AdWords::V13::SiteSuggestionService::GetSitesByDemographics.new(demo, targeting)
            return @driver.getSitesByDemographics(obj)
          rescue SOAP::FaultError => fault
            raise(AdWords::Error::create_specific_api_error(fault),
                "getSitesByDemographics Call Failed: " + fault.faultstring.to_s, caller)
          end
        end
getSitesByTopics(topics, targeting)

Calls the getSitesByTopics method of the SiteSuggestion service. Check the online documentation for this method.

Args:

Returns:

Raises: Error::ApiError (or a subclass thereof) if a SOAP fault occurs.

# File lib/adwords4r/v13/SiteSuggestionServiceWrapper.rb, line 109
        def getSitesByTopics(topics, targeting)
          begin
            AdWords::Service.validate_param('topics',
                topics, SOAP::SOAPArray)
            AdWords::Service.validate_param('targeting',
                targeting, AdWords::V13::SiteSuggestionService::LanguageGeoTargeting)
            # Construct request object and make API call
            obj = AdWords::V13::SiteSuggestionService::GetSitesByTopics.new(topics, targeting)
            return @driver.getSitesByTopics(obj)
          rescue SOAP::FaultError => fault
            raise(AdWords::Error::create_specific_api_error(fault),
                "getSitesByTopics Call Failed: " + fault.faultstring.to_s, caller)
          end
        end
getSitesByUrls(urls, targeting)

Calls the getSitesByUrls method of the SiteSuggestion service. Check the online documentation for this method.

Args:

Returns:

Raises: Error::ApiError (or a subclass thereof) if a SOAP fault occurs.

# File lib/adwords4r/v13/SiteSuggestionServiceWrapper.rb, line 137
        def getSitesByUrls(urls, targeting)
          begin
            AdWords::Service.validate_param('urls',
                urls, SOAP::SOAPArray)
            AdWords::Service.validate_param('targeting',
                targeting, AdWords::V13::SiteSuggestionService::LanguageGeoTargeting)
            # Construct request object and make API call
            obj = AdWords::V13::SiteSuggestionService::GetSitesByUrls.new(urls, targeting)
            return @driver.getSitesByUrls(obj)
          rescue SOAP::FaultError => fault
            raise(AdWords::Error::create_specific_api_error(fault),
                "getSitesByUrls Call Failed: " + fault.faultstring.to_s, caller)
          end
        end