NAME

Google::Ads::AdWords::Utilities::PageProcessor

DESCRIPTION

This is a utility that provides automatic paging of results.

PROPERTIES

The following properties may be accessed using get_PROPERTY methods:

METHODS

new

Constructor. The following data structure may be passed to new():

{ # Google::Ads::AdWords::Utilities::PageProcessor
  service =>  $service, # A service e.g.
  Google::Ads::AdWords::v201702::TypeMaps::CampaignService object
  selector => $selector, # A reference to a selector e.g.
  Google::Ads::AdWords::v201702::Selector. When 'selector' is defined,
  'query' cannot be defined.
  query => $query, # A string representing a query e.g.
  SELECT Id, Name, Status ORDER BY Name. When 'query' is defined, 'selector'
  cannot be defined.
  page_size => $page_size, # The size of the page (only used when 'query' is
  defined in the constructor).
  If not defined, the default of
  L<Google::Ads::AdWords::Constants:DEFAULT_PAGE_SIZE> will be used.
},

METHODS

process_entries

Process the entries that were retrieved from the service. For each entry, execute the subroutine that was passed in as an argument. Return the results of the subroutines as an array of results.

Parameters

  • A reference to the subroutine that will be executed on each entry.

Returns

An array of all subroutine results (one per entry).

get_entries

Returns all the entries from all the pages in an array.

Returns

An array of entries from all the pages.

is_end_of_page

Returns whether or not processing has reached the end of a page boundary.

Returns

Returns a 1 if processing reached the end of a page and 0 otherwise.