.. automethod:: API.get_settings
+.. automethod:: API.verify_credentials
+
Direct Message Methods
----------------------
Account Methods
---------------
-.. method:: API.verify_credentials([include_entities], [skip_status], \
- [include_email])
-
- Verify the supplied user credentials are valid.
-
- :param include_entities: |include_entities|
- :param skip_status: |skip_status|
- :param include_email: When set to true email will be returned in the user
- objects as a string.
- :rtype: :class:`User` object if credentials are valid, otherwise False
-
-
.. method:: API.rate_limit_status()
Returns the current rate limits for methods belonging to the specified
'GET', 'account/settings', use_cache=False, **kwargs
)
+ @payload('user')
+ def verify_credentials(self, **kwargs):
+ """verify_credentials(*, include_entities, skip_status, include_email)
+
+ Verify the supplied user credentials are valid.
+
+ :param include_entities: |include_entities|
+ :param skip_status: |skip_status|
+ :param include_email: When set to true email will be returned in the
+ user objects as a string.
+
+ :rtype: :class:`User` object if credentials are valid, otherwise False
+
+ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/manage-account-settings/api-reference/get-account-verify_credentials
+ """
+ if 'include_email' in kwargs:
+ kwargs['include_email'] = str(kwargs['include_email']).lower()
+ return self.request(
+ 'GET', 'account/verify_credentials', endpoint_parameters=(
+ 'include_entities', 'skip_status', 'include_email'
+ ), **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
), use_cache=False, **kwargs
)
- @payload('user')
- def verify_credentials(self, **kwargs):
- """ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/manage-account-settings/api-reference/get-account-verify_credentials
- """
- if 'include_email' in kwargs:
- kwargs['include_email'] = str(kwargs['include_email']).lower()
- return self.request(
- 'GET', 'account/verify_credentials', endpoint_parameters=(
- 'include_entities', 'skip_status', 'include_email'
- ), **kwargs
- )
-
@payload('json')
def rate_limit_status(self, **kwargs):
""" :reference: https://developer.twitter.com/en/docs/twitter-api/v1/developer-utilities/rate-limit-status/api-reference/get-application-rate_limit_status