NAME

Google::Ads::GoogleAds::Utils::SearchStreamHandler

SYNOPSIS

my $search_stream_request =
  Google::Ads::GoogleAds::V18::Services::GoogleAdsService::SearchGoogleAdsStreamRequest
  ->new({
    customerId => $customer_id,
    query => "SELECT campaign.id, campaign.name FROM campaign ORDER BY campaign.id"
  });

my $google_ads_service = $api_client->GoogleAdsService();

my $search_stream_handler = Google::Ads::GoogleAds::Utils::SearchStreamHandler->new({
  service => $google_ads_service,
  request => $search_stream_request
});

$search_stream_handler->process_contents(
  sub {
    my $google_ads_row = shift;
    # Do something with each GooglerAdsRow object.
  });

DESCRIPTION

The handler class to process the response of stream search. The handler should be constructed with a Google::Ads::GoogleAds::V18::Services::GoogleAdsService and a Google::Ads::GoogleAds::V18::Services::GoogleAdsService::SearchGoogleAdsStreamRequest.

my $search_stream_handler = Google::Ads::GoogleAds::Utils::SearchStreamHandler->new({
  service => $google_ads_service,
  request => $search_stream_request
});

METHODS

process_contents

Processes the response content of stream search.

Parameters

LICENSE AND COPYRIGHT

Copyright 2020 Google LLC

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

REPOSITORY INFORMATION

$Rev: $
$LastChangedBy: $
$Id: $