def GetFeedItems(client, feed):
 feed_item_service = client.GetService('FeedItemService', 'v201607')
 feed_items = []
 more_pages = True
 selector = {'fields': ['FeedItemId', 'AttributeValues', 'Scheduling'], '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

def GetFeedItems ( client , feed ) : feed_item_service = client . GetService ( 'FeedItemService' , 'v201607' ) feed_items = [ ] more_pages = True selector = { 'fields' : [ 'FeedItemId' , 'AttributeValues' , 'Scheduling' ] , '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
returns the feed items for a given feed .