Add documentation for API.friendships_outgoing
authorHarmon <Harmon758@gmail.com>
Wed, 7 Apr 2021 18:15:08 +0000 (13:15 -0500)
committerHarmon <Harmon758@gmail.com>
Wed, 7 Apr 2021 18:15:08 +0000 (13:15 -0500)
Improve method order

docs/api.rst
tweepy/api.py

index 32fbd33c536eda83047d1cfdb10ab8117fba4b5d..4aefab5918718cc7767d6f7f9b5952d93cac77fe 100644 (file)
@@ -125,6 +125,8 @@ Follow, search, and get users
 
 .. automethod:: API.no_retweets_friendships
 
+.. automethod:: API.friendships_outgoing
+
 
 User methods
 ------------
index ae3a76cc1262090d7d2cf187b8ab8eec92f348bb..42bfb2ac1336e9c188d8198fc70c737d53b9483c 100644 (file)
@@ -1548,6 +1548,27 @@ class API:
             ), **kwargs
         )
 
+    @pagination(mode='cursor')
+    @payload('ids')
+    def friendships_outgoing(self, **kwargs):
+        """friendships_outgoing(*, cursor, stringify_ids)
+
+        Returns a collection of numeric IDs for every protected user for whom
+        the authenticating user has a pending follow request.
+
+        :param cursor: |cursor|
+        :param stringify_ids: |stringify_ids|
+
+        :rtype: list of :class:`int`
+
+        :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/get-friendships-outgoing
+        """
+        return self.request(
+            'GET', 'friendships/outgoing', endpoint_parameters=(
+                'cursor', 'stringify_ids'
+            ), **kwargs
+        )
+
     def media_upload(self, filename, *, file=None, chunked=False,
                      media_category=None, additional_owners=None, **kwargs):
         """ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/media/upload-media/overview
@@ -1844,17 +1865,6 @@ class API:
             ), **kwargs
         )
 
-    @pagination(mode='cursor')
-    @payload('ids')
-    def friendships_outgoing(self, **kwargs):
-        """ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/get-friendships-outgoing
-        """
-        return self.request(
-            'GET', 'friendships/outgoing', endpoint_parameters=(
-                'cursor', 'stringify_ids'
-            ), **kwargs
-        )
-
     @payload('json')
     def get_settings(self, **kwargs):
         """ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/manage-account-settings/api-reference/get-account-settings