.. automethod:: API.get_status
+.. automethod:: API.create_favorite
+
Status methods
--------------
Favorite Methods
----------------
-.. method:: API.create_favorite(id)
-
- Favorites the status specified in the ID parameter as the authenticating
- user.
-
- :param id: |sid|
- :rtype: :class:`Status` object
-
-
.. method:: API.destroy_favorite(id)
Un-favorites the status specified in the ID parameter as the authenticating
), id=id, **kwargs
)
+ @payload('status')
+ def create_favorite(self, id, **kwargs):
+ """create_favorite(id, *, include_entities)
+
+ Favorites the status specified in the ``id`` parameter as the
+ authenticating user.
+
+ :param id: |sid|
+ :param include_entities: |include_entities|
+
+ :rtype: :class:`Status` object
+
+ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/post-favorites-create
+ """
+ return self.request(
+ 'POST', 'favorites/create', endpoint_parameters=(
+ 'id', 'include_entities'
+ ), id=id, **kwargs
+ )
+
@payload('status')
def update_status(self, status, **kwargs):
""" :reference: https://developer.twitter.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/post-statuses-update
), **kwargs
)
- @payload('status')
- def create_favorite(self, id, **kwargs):
- """ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/post-favorites-create
- """
- return self.request(
- 'POST', 'favorites/create', endpoint_parameters=(
- 'id', 'include_entities'
- ), id=id, **kwargs
- )
-
@payload('status')
def destroy_favorite(self, id, **kwargs):
""" :reference: https://developer.twitter.com/en/docs/twitter-api/v1/tweets/post-and-engage/api-reference/post-favorites-destroy