Rename API.list_direct_messages to API.get_direct_messages
authorHarmon <Harmon758@gmail.com>
Fri, 28 May 2021 13:01:11 +0000 (08:01 -0500)
committerHarmon <Harmon758@gmail.com>
Fri, 28 May 2021 13:01:11 +0000 (08:01 -0500)
cassettes/testgetdirectmessages.json [moved from cassettes/testlistdirectmessages.json with 100% similarity]
docs/api.rst
tests/test_api.py
tweepy/api.py

index 50502ca23ce6aa8c948cb73c9ed2c0e98579f12c..ec02bb1433351226b1ca9b1a9170ab4e1b9ae866 100644 (file)
     +------------------------------------------+-------------------------------------+
     | `DELETE direct_messages/events/destroy`_ | :meth:`API.destroy_direct_message`  |
     +------------------------------------------+-------------------------------------+
-    | `GET direct_messages/events/list`_       | :meth:`API.list_direct_messages`    |
+    | `GET direct_messages/events/list`_       | :meth:`API.get_direct_messages`     |
     +------------------------------------------+-------------------------------------+
     | `GET direct_messages/events/show`_       | :meth:`API.get_direct_message`      |
     +------------------------------------------+-------------------------------------+
@@ -556,7 +556,7 @@ Sending and receiving events
 
 .. automethod:: API.destroy_direct_message
 
-.. automethod:: API.list_direct_messages
+.. automethod:: API.get_direct_messages
 
 .. automethod:: API.get_direct_message
 
index 84671deae9aab233fce67efed08e248e9547c55b..76c5faf97f3fe189069266c9de6898cff6afdaae 100644 (file)
@@ -131,9 +131,9 @@ class TweepyAPITests(TweepyTestCase):
     def testsearchusers(self):
         self.api.search_users('twitter')
 
-    @tape.use_cassette('testlistdirectmessages.json')
-    def testlistdirectmessages(self):
-        self.api.list_direct_messages()
+    @tape.use_cassette('testgetdirectmessages.json')
+    def testgetdirectmessages(self):
+        self.api.get_direct_messages()
 
     @tape.use_cassette('testsendanddestroydirectmessage.json')
     def testsendanddestroydirectmessage(self):
index 628237f7e48ff116fcd42bfcc82f3dca299008fc..377688ef60b4045985e0cb1d19cec230bc80b520 100644 (file)
@@ -3179,8 +3179,8 @@ class API:
 
     @pagination(mode='dm_cursor')
     @payload('direct_message', list=True)
-    def list_direct_messages(self, **kwargs):
-        """list_direct_messages(*, count, cursor)
+    def get_direct_messages(self, **kwargs):
+        """get_direct_messages(*, count, cursor)
 
         Returns all Direct Message events (both sent and received) within the
         last 30 days. Sorted in reverse-chronological order.