From: Harmon Date: Fri, 28 Oct 2022 06:20:20 +0000 (-0500) Subject: Use _construct_response in AsyncClient._make_request X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9983735313c10906479348621f835bbbc38e5619;p=tweepy.git Use _construct_response in AsyncClient._make_request --- diff --git a/tweepy/asynchronous/client.py b/tweepy/asynchronous/client.py index be256ae..e0bdf3c 100644 --- a/tweepy/asynchronous/client.py +++ b/tweepy/asynchronous/client.py @@ -155,16 +155,7 @@ class AsyncBaseClient(BaseClient): if self.return_type is dict: return response - data = response.get("data") - data = self._process_data(data, data_type=data_type) - - includes = response.get("includes", {}) - includes = self._process_includes(includes) - - errors = response.get("errors", []) - meta = response.get("meta", {}) - - return Response(data, includes, errors, meta) + return self._construct_response(response, data_type=data_type) class AsyncClient(AsyncBaseClient):