nodes: 0, module; 1, function_definition; 2, function_name:filter_feed; 3, parameters; 4, block; 5, identifier:self; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, default_parameter; 12, expression_statement; 13, assert_statement; 14, if_statement; 15, if_statement; 16, expression_statement; 17, return_statement; 18, identifier:updated; 19, False; 20, identifier:following; 21, False; 22, identifier:folder; 23, False; 24, identifier:filter_folder; 25, string:""; 26, identifier:sort; 27, string:"updated"; 28, identifier:nid; 29, None; 30, comment:"""Get filtered feed
  
          Only one filter type (updated, following, folder) is possible.
  
          :type  nid: str
          :param nid: This is the ID of the network to get the feed
              from. This is optional and only to override the existing
              `network_id` entered when created the class
          :type sort: str
          :param sort: How to sort feed that will be retrieved; only current
              known value is "updated"
          :type updated: bool
          :param updated: Set to filter through only posts which have been updated
              since you last read them
          :type following: bool
          :param following: Set to filter through only posts which you are
              following
          :type folder: bool
          :param folder: Set to filter through only posts which are in the
              provided ``filter_folder``
          :type filter_folder: str
          :param filter_folder: Name of folder to show posts from; required
              only if ``folder`` is set
          """; 31, comparison_operator:sum([updated, following, folder]) == 1; 32, identifier:folder; 33, block; 34, identifier:updated; 35, block; 36, elif_clause; 37, else_clause; 38, assignment; 39, call; 40, call; 41, integer:1; 42, assert_statement; 43, expression_statement; 44, identifier:following; 45, block; 46, block; 47, identifier:r; 48, call; 49, attribute; 50, argument_list; 51, identifier:sum; 52, argument_list; 53, identifier:filter_folder; 54, assignment; 55, expression_statement; 56, expression_statement; 57, attribute; 58, argument_list; 59, identifier:self; 60, identifier:_handle_error; 61, identifier:r; 62, string:"Could not retrieve filtered feed."; 63, list; 64, identifier:filter_type; 65, call; 66, assignment; 67, assignment; 68, identifier:self; 69, identifier:request; 70, keyword_argument; 71, keyword_argument; 72, keyword_argument; 73, identifier:updated; 74, identifier:following; 75, identifier:folder; 76, identifier:dict; 77, argument_list; 78, identifier:filter_type; 79, call; 80, identifier:filter_type; 81, call; 82, identifier:nid; 83, identifier:nid; 84, identifier:method; 85, string:"network.filter_feed"; 86, identifier:data; 87, call; 88, keyword_argument; 89, identifier:dict; 90, argument_list; 91, identifier:dict; 92, argument_list; 93, identifier:dict; 94, argument_list; 95, identifier:updated; 96, integer:1; 97, keyword_argument; 98, keyword_argument; 99, keyword_argument; 100, keyword_argument; 101, dictionary_splat; 102, identifier:following; 103, integer:1; 104, identifier:folder; 105, integer:1; 106, identifier:filter_folder; 107, identifier:filter_folder; 108, identifier:sort; 109, identifier:sort; 110, identifier:filter_type
code: def filter_feed(self, updated=False, following=False, folder=False,
                      filter_folder="", sort="updated", nid=None):
          """Get filtered feed
  
          Only one filter type (updated, following, folder) is possible.
  
          :type  nid: str
          :param nid: This is the ID of the network to get the feed
              from. This is optional and only to override the existing
              `network_id` entered when created the class
          :type sort: str
          :param sort: How to sort feed that will be retrieved; only current
              known value is "updated"
          :type updated: bool
          :param updated: Set to filter through only posts which have been updated
              since you last read them
          :type following: bool
          :param following: Set to filter through only posts which you are
              following
          :type folder: bool
          :param folder: Set to filter through only posts which are in the
              provided ``filter_folder``
          :type filter_folder: str
          :param filter_folder: Name of folder to show posts from; required
              only if ``folder`` is set
          """
          assert sum([updated, following, folder]) == 1
          if folder:
              assert filter_folder
  
          if updated:
              filter_type = dict(updated=1)
          elif following:
              filter_type = dict(following=1)
          else:
              filter_type = dict(folder=1, filter_folder=filter_folder)
  
          r = self.request(
              nid=nid,
              method="network.filter_feed",
              data=dict(
                  sort=sort,
                  **filter_type
              )
          )
          return self._handle_error(r, "Could not retrieve filtered feed.")