Remove API.set_delivery_device
authorHarmon <Harmon758@gmail.com>
Fri, 3 May 2019 03:22:39 +0000 (22:22 -0500)
committerHarmon <Harmon758@gmail.com>
Fri, 3 May 2019 03:22:39 +0000 (22:22 -0500)
Resolves #1203

docs/api.rst
tests/test_api.py
tweepy/api.py

index dbda682e0406a81a05030a47956f1b205b42e2b5..7faf6b3a9182f3a5e21e80920e88be36beec4dbf 100644 (file)
@@ -382,15 +382,6 @@ Account Methods
    :rtype: :class:`JSON` object
 
 
-.. method:: API.set_delivery_device(device)
-
-   Sets which device Twitter delivers updates to for the authenticating
-   user. Sending "none" as the device parameter will disable SMS updates.
-
-   :param device: Must be one of: sms, none
-   :rtype: :class:`User` object
-
-
 .. method:: API.update_profile_image(filename)
 
    Update the authenticating user's profile image. Valid formats: GIF,
index 53a339795528fbea96ae671bb8d7235f667ad5d4..d1e1e32a90d8f6b71553a81c2882340d2b7c77b4 100644 (file)
@@ -223,12 +223,6 @@ class TweepyAPITests(TweepyTestCase):
     def testratelimitstatus(self):
         self.api.rate_limit_status()
 
-    """ TODO(josh): Remove once this deprecated API is gone.
-    def testsetdeliverydevice(self):
-        self.api.set_delivery_device('im')
-        self.api.set_delivery_device('none')
-    """
-
     @tape.use_cassette('testupdateprofilecolors.json')
     def testupdateprofilecolors(self):
         original = self.api.me()
index baf0d541faccc639ad3102d9ae69199aac2aa126..574a73e94d1196526890ebb16d3fe409072c432e 100644 (file)
@@ -664,20 +664,6 @@ class API(object):
             use_cache=False
         )
 
-    @property
-    def set_delivery_device(self):
-        """ :reference: https://dev.twitter.com/rest/reference/post/account/update_delivery_device
-            :allowed_param:'device'
-        """
-        return bind_api(
-            api=self,
-            path='/account/update_delivery_device.json',
-            method='POST',
-            allowed_param=['device'],
-            payload_type='user',
-            require_auth=True
-        )
-
     def update_profile_image(self, filename, file_=None):
         """ :reference: https://developer.twitter.com/en/docs/accounts-and-users/manage-account-settings/api-reference/post-account-update_profile_image
             :allowed_param:'include_entities', 'skip_status'