Skip to content

Latest commit

 

History

History
639 lines (509 loc) · 40.9 KB

api.rst

File metadata and controls

639 lines (509 loc) · 40.9 KB
.. currentmodule:: tweepy

:class:`tweepy.API` --- Twitter API v1.1 Reference

.. autoclass:: API

Twitter API v1.1 Endpoint :class:`API` Method
.. centered:: :ref:`Premium Search APIs`
GET search/30day/:label :meth:`API.search_30_day`
GET search/fullarchive/:label :meth:`API.search_full_archive`
.. centered:: :ref:`Tweets`
.. centered:: |Get Tweet timelines|_
GET statuses/home_timeline :meth:`API.home_timeline`
GET statuses/mentions_timeline :meth:`API.mentions_timeline`
GET statuses/user_timeline :meth:`API.user_timeline`
.. centered:: |Post, retrieve, and engage with Tweets|_
GET favorites/list :meth:`API.favorites`
GET statuses/lookup :meth:`API.lookup_statuses`
GET statuses/oembed :meth:`API.get_oembed`
GET statuses/retweeters/ids :meth:`API.retweeters`
GET statuses/retweets/:id :meth:`API.retweets`
GET statuses/retweets_of_me :meth:`API.retweets_of_me`
GET statuses/show/:id :meth:`API.get_status`
POST favorites/create :meth:`API.create_favorite`
POST favorites/destroy :meth:`API.destroy_favorite`
POST statuses/destroy/:id :meth:`API.destroy_status`
POST statuses/retweet/:id :meth:`API.retweet`
POST statuses/unretweet/:id :meth:`API.unretweet`
POST statuses/update :meth:`API.update_status`
POST statuses/update_with_media :meth:`API.update_with_media`
.. centered:: |Search Tweets|_
GET search/tweets :meth:`API.search`
.. centered:: :ref:`Accounts and users`
.. centered:: |Create and manage lists|_
GET lists/list :meth:`API.get_lists`
GET lists/members :meth:`API.get_list_members`
GET lists/members/show :meth:`API.get_list_member`
GET lists/memberships :meth:`API.lists_memberships`
GET lists/ownerships :meth:`API.lists_ownerships`
GET lists/show :meth:`API.get_list`
GET lists/statuses :meth:`API.list_timeline`
GET lists/subscribers :meth:`API.list_subscribers`
GET lists/subscribers/show :meth:`API.get_list_subscriber`
GET lists/subscriptions :meth:`API.lists_subscriptions`
POST lists/create :meth:`API.create_list`
POST lists/destroy :meth:`API.destroy_list`
POST lists/members/create :meth:`API.add_list_member`
POST lists/members/create_all :meth:`API.add_list_members`
POST lists/members/destroy :meth:`API.remove_list_member`
POST lists/members/destroy_all :meth:`API.remove_list_members`
POST lists/subscribers/create :meth:`API.subscribe_list`
POST lists/subscribers/destroy :meth:`API.unsubscribe_list`
POST lists/update :meth:`API.update_list`
.. centered:: |Follow, search, and get users|_
GET followers/ids :meth:`API.followers_ids`
GET followers/list :meth:`API.followers`
GET friends/ids :meth:`API.friends_ids`
GET friends/list :meth:`API.friends`
GET friendships/incoming :meth:`API.friendships_incoming`
GET friendships/lookup :meth:`API.lookup_friendships`
GET friendships/no_retweets/ids :meth:`API.no_retweets_friendships`
GET friendships/outgoing :meth:`API.friendships_outgoing`
GET friendships/show :meth:`API.get_friendship`
GET users/lookup :meth:`API.lookup_users`
GET users/search :meth:`API.search_users`
GET users/show :meth:`API.get_user`
POST friendships/create :meth:`API.create_friendship`
POST friendships/destroy :meth:`API.destroy_friendship`
POST friendships/update :meth:`API.update_friendship`
.. centered:: |Manage account settings and profile|_
GET account/settings :meth:`API.get_settings`
GET account/verify_credentials :meth:`API.verify_credentials`
GET saved_searches/list :meth:`API.get_saved_searches`
GET saved_searches/show/:id :meth:`API.get_saved_search`
GET users/profile_banner :meth:`API.get_profile_banner`
POST account/remove_profile_banner :meth:`API.remove_profile_banner`
POST account/settings :meth:`API.set_settings`
POST account/update_profile :meth:`API.update_profile`
POST account/update_profile_banner :meth:`API.update_profile_banner`
POST account/update_profile_image :meth:`API.update_profile_image`
POST saved_searches/create :meth:`API.create_saved_search`
POST saved_searches/destroy/:id :meth:`API.destroy_saved_search`
.. centered:: |Mute, block, and report users|_
GET blocks/ids :meth:`API.blocks_ids`
GET blocks/list :meth:`API.blocks`
GET mutes/users/ids :meth:`API.mutes_ids`
GET mutes/users/list :meth:`API.mutes`
POST blocks/create :meth:`API.create_block`
POST blocks/destroy :meth:`API.destroy_block`
POST mutes/users/create :meth:`API.create_mute`
POST mutes/users/destroy :meth:`API.destroy_mute`
POST users/report_spam :meth:`API.report_spam`
.. centered:: :ref:`Direct Messages`
.. centered:: |Sending and receiving events|_
DELETE direct_messages/events/destroy :meth:`API.destroy_direct_message`
GET direct_messages/events/list :meth:`API.list_direct_messages`
GET direct_messages/events/show :meth:`API.get_direct_message`
POST direct_messages/events/new :meth:`API.send_direct_message`
.. centered:: :ref:`Media`
.. centered:: |Upload media|_
GET media/upload :meth:`API.get_media_upload_status`
POST media/metadata/create :meth:`API.create_media_metadata`
  :meth:`API.media_upload`
POST media/upload :meth:`API.simple_upload`
  :meth:`API.chunked_upload`
POST media/upload (APPEND) :meth:`API.chunked_upload_append`
POST media/upload (FINALIZE) :meth:`API.chunked_upload_finalize`
POST media/upload (INIT) :meth:`API.chunked_upload_init`
.. centered:: :ref:`Trends`
.. centered:: |Get locations with trending topics|_
GET trends/available :meth:`API.trends_available`
GET trends/closest :meth:`API.trends_closest`
.. centered::  |Get trends near a location|_
GET trends/place :meth:`API.trends_place`
.. centered:: :ref:`Geo`
.. centered:: |Get information about a place|_
GET geo/id/:place_id :meth:`API.geo_id`
.. centered::  |Get places near a location|_
GET geo/reverse_geocode :meth:`API.reverse_geocode`
GET geo/search :meth:`API.search_geo`
.. centered:: :ref:`Developer utilities`
.. centered:: |Get Twitter configuration details|_
GET help/configuration :meth:`API.configuration`
.. centered:: |Get Twitter supported languages|_
GET help/languages :meth:`API.supported_languages`
.. centered:: |Get app rate limit status|_
GET application/rate_limit_status :meth:`API.rate_limit_status`

Premium Search APIs

.. automethod:: API.search_30_day

.. automethod:: API.search_full_archive

Tweets

Get Tweet timelines

.. automethod:: API.home_timeline

.. automethod:: API.mentions_timeline

.. automethod:: API.user_timeline

Post, retrieve, and engage with Tweets

.. automethod:: API.favorites

.. automethod:: API.lookup_statuses

.. automethod:: API.get_oembed

.. automethod:: API.retweeters

.. automethod:: API.retweets

.. automethod:: API.retweets_of_me

.. automethod:: API.get_status

.. automethod:: API.create_favorite

.. automethod:: API.destroy_favorite

.. automethod:: API.destroy_status

.. automethod:: API.retweet

.. automethod:: API.unretweet

.. automethod:: API.update_status

.. automethod:: API.update_with_media

Search Tweets

.. automethod:: API.search

Accounts and users

Create and manage lists

.. automethod:: API.get_lists

.. automethod:: API.get_list_members

.. automethod:: API.get_list_member

.. automethod:: API.lists_memberships

.. automethod:: API.lists_ownerships

.. automethod:: API.get_list

.. automethod:: API.list_timeline

.. automethod:: API.list_subscribers

.. automethod:: API.get_list_subscriber

.. automethod:: API.lists_subscriptions

.. automethod:: API.create_list

.. automethod:: API.destroy_list

.. automethod:: API.add_list_member

.. automethod:: API.add_list_members

.. automethod:: API.remove_list_member

.. automethod:: API.remove_list_members

.. automethod:: API.subscribe_list

.. automethod:: API.unsubscribe_list

.. automethod:: API.update_list

Follow, search, and get users

.. automethod:: API.followers_ids

.. automethod:: API.followers

.. automethod:: API.friends_ids

.. automethod:: API.friends

.. automethod:: API.friendships_incoming

.. automethod:: API.lookup_friendships

.. automethod:: API.no_retweets_friendships

.. automethod:: API.friendships_outgoing

.. automethod:: API.get_friendship

.. automethod:: API.lookup_users

.. automethod:: API.search_users

.. automethod:: API.get_user

.. automethod:: API.create_friendship

.. automethod:: API.destroy_friendship

.. automethod:: API.update_friendship

Manage account settings and profile

.. automethod:: API.get_settings

.. automethod:: API.verify_credentials

.. automethod:: API.get_saved_searches

.. automethod:: API.get_saved_search

.. automethod:: API.get_profile_banner

.. automethod:: API.remove_profile_banner

.. automethod:: API.set_settings

.. automethod:: API.update_profile

.. automethod:: API.update_profile_banner

.. automethod:: API.update_profile_image

.. automethod:: API.create_saved_search

.. automethod:: API.destroy_saved_search

Mute, block, and report users

.. automethod:: API.blocks_ids

.. automethod:: API.blocks

.. automethod:: API.mutes_ids

.. automethod:: API.mutes

.. automethod:: API.create_block

.. automethod:: API.destroy_block

.. automethod:: API.create_mute

.. automethod:: API.destroy_mute

.. automethod:: API.report_spam

Direct Messages

Sending and receiving events

.. automethod:: API.destroy_direct_message

.. automethod:: API.list_direct_messages

.. automethod:: API.get_direct_message

.. automethod:: API.send_direct_message

Media

Upload media

.. automethod:: API.get_media_upload_status

.. automethod:: API.create_media_metadata

.. automethod:: API.media_upload

.. automethod:: API.simple_upload

.. automethod:: API.chunked_upload

.. automethod:: API.chunked_upload_append

.. automethod:: API.chunked_upload_finalize

.. automethod:: API.chunked_upload_init

Trends

Get locations with trending topics

.. automethod:: API.trends_available

.. automethod:: API.trends_closest

Get trends near a location

.. automethod:: API.trends_place

Geo

Get information about a place

.. automethod:: API.geo_id

Get places near a location

.. automethod:: API.reverse_geocode

.. automethod:: API.search_geo

Developer utilities

Get Twitter configuration details

.. automethod:: API.configuration

Get Twitter supported languages

.. automethod:: API.supported_languages

Get app rate limit status

.. automethod:: API.rate_limit_status


Footnotes

[1]https://web.archive.org/web/20170829051949/https://dev.twitter.com/rest/reference/get/search/tweets
[2]https://twittercommunity.com/t/favorited-reports-as-false-even-if-status-is-already-favorited-by-the-user/11145