Returns the Feed Items for a given Feed.

  Args:
    client: an AdWordsClient instance.
    feed: the Feed we are retrieving Feed Items from.

  Returns:
    The Feed Items associated with the given Feed.

def GetFeedItems(client, feed):
  """Returns the Feed Items for a given Feed.

  Args:
    client: an AdWordsClient instance.
    feed: the Feed we are retrieving Feed Items from.

  Returns:
    The Feed Items associated with the given Feed.
  """
  feed_item_service = client.GetService('FeedItemService', 'v201809')

  feed_items = []
  more_pages = True

  selector = {
      'fields': ['FeedItemId', 'AttributeValues'],
      'predicates': [
          {
              'field': 'Status',
              'operator': 'EQUALS',
              'values': ['ENABLED']
          },
          {
              'field': 'FeedId',
              'operator': 'EQUALS',
              'values': [feed['id']]
          }
      ],
      'paging': {
          'startIndex': 0,
          'numberResults': PAGE_SIZE
      }
  }

  while more_pages:
    page = feed_item_service.get(selector)

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

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

  return feed_items