private static List < Feed > getFeeds ( AdWordsServicesInterface adWordsServices , AdWordsSession session ) throws RemoteException { FeedServiceInterface feedService = adWordsServices . get ( session , FeedServiceInterface . class ) ; String query = "SELECT Id, Name, Attributes WHERE Origin = 'USER' AND FeedStatus = 'ENABLED'" ; List < Feed > feeds = new ArrayList <> ( ) ; int offset = 0 ; FeedPage feedPage ; do { String pageQuery = String . format ( query + " LIMIT %d, %d" , offset , PAGE_SIZE ) ; feedPage = feedService . query ( pageQuery ) ; if ( feedPage . getEntries ( ) != null ) { feeds . addAll ( Arrays . asList ( feedPage . getEntries ( ) ) ) ; } offset += PAGE_SIZE ; } while ( offset < feedPage . getTotalNumEntries ( ) ) ; return feeds ; }
Returns a list of all enabled feeds .