Catch the four methods that won't get caught with our deprecation fix

This commit is contained in:
Mike Helmick 2013-05-04 19:46:23 -04:00
parent 498bd9e557
commit 600f36c6ba

View file

@ -88,8 +88,18 @@ class Twython(object):
self.__dict__[key] = setFunc(key) self.__dict__[key] = setFunc(key)
# Allow for old camelCase functions until Twython 3.0.0 # Allow for old camelCase functions until Twython 3.0.0
deprecated_key = key.title().replace('_', '') if key == 'get_friend_ids':
deprecated_key = deprecated_key[0].lower() + deprecated_key[1:] deprecated_key = 'getFriendIDs'
elif key == 'get_followers_ids':
deprecated_key = 'getFollowerIDs'
elif key == 'get_incoming_friendship_ids':
deprecated_key = 'getIncomingFriendshipIDs'
elif key == 'get_outgoing_friendship_ids':
deprecated_key = 'getOutgoingFriendshipIDs'
else:
deprecated_key = key.title().replace('_', '')
deprecated_key = deprecated_key[0].lower() + deprecated_key[1:]
self.__dict__[deprecated_key] = setFunc(key, deprecated_key) self.__dict__[deprecated_key] = setFunc(key, deprecated_key)
# create stash for last call intel # create stash for last call intel