def GetCampaignFeeds(client, feed, placeholder_type):
  campaign_feed_service = client.GetService('CampaignFeedService', 'v201603')

  campaign_feeds = []
  more_pages = True

  selector = {
      'fields': ['CampaignId', 'MatchingFunction', 'PlaceholderTypes'],
      'predicates': [
          {
              'field': 'Status',
              'operator': 'EQUALS',
              'values': ['ENABLED']
          },
          {
              'field': 'FeedId',
              'operator': 'EQUALS',
              'values': [feed['id']]
          },
          {
              'field': 'PlaceholderTypes',
              'operator': 'CONTAINS_ANY',
              'values': [placeholder_type]
          }
      ],
      'paging': {
          'startIndex': 0,
          'numberResults': PAGE_SIZE
      }
  }

  while more_pages:
    page = campaign_feed_service.get(selector)

    if 'entries' in page:
      campaign_feeds.extend(page['entries'])

    selector['paging']['startIndex'] += PAGE_SIZE
    more_pages = selector['paging']['startIndex'] < int(page['totalNumEntries'])

  return campaign_feeds
Get a list of Feed Item Ids used by a campaign via a given Campaign Feed.
dataset/ETHPy150Open googleads/googleads-python-lib/examples/adwords/v201603/migration/migrate_to_extension_settings.py/GetCampaignFeeds