Breakout Response creation into separate method
authorJ.Endurium <J.Endurium.K@gmail.com>
Fri, 28 Oct 2022 05:18:55 +0000 (00:18 -0500)
committerJ.Endurium <J.Endurium.K@gmail.com>
Fri, 28 Oct 2022 05:18:55 +0000 (00:18 -0500)
tweepy/client.py

index c7db560caa317b280a73f59ea2cf1d9123d0b0d0..2afda8ecbb90075e29930cb36c9b1d8643a17c23 100644 (file)
@@ -137,6 +137,9 @@ class BaseClient:
         if self.return_type is dict:
             return response
 
+        return self._construct_response(response, data_type=data_type)
+
+    def _construct_response(self, response, data_type=None):
         data = response.get("data")
         data = self._process_data(data, data_type=data_type)