From: Harmon Date: Fri, 29 Oct 2021 16:22:28 +0000 (-0500) Subject: Fix IdIterator to pass API instance to parsers and models X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=451e921210677ee0a618849f189bdfeea497a00c;p=tweepy.git Fix IdIterator to pass API instance to parsers and models --- diff --git a/tweepy/cursor.py b/tweepy/cursor.py index e89b985..d3ccdd4 100644 --- a/tweepy/cursor.py +++ b/tweepy/cursor.py @@ -166,14 +166,14 @@ class IdIterator(BaseIterator): if self.index >= len(self.results) - 1: data = self.method(max_id=self.max_id, parser=RawParser(), *self.args, **self.kwargs) - # This is a special invocation that returns the underlying - # APIMethod class model = ModelParser().parse( - data, payload_list=self.method.payload_list, + data, api = self.method.__self__, + payload_list=self.method.payload_list, payload_type=self.method.payload_type ) result = self.method.__self__.parser.parse( - data, payload_list=self.method.payload_list, + data, api = self.method.__self__, + payload_list=self.method.payload_list, payload_type=self.method.payload_type )