.. include:: parameters.rst
-**************************************************
-:class:`tweepy.API` --- Twitter API v1.1 Reference
-**************************************************
+************
+:class:`API`
+************
.. autoclass:: API
.. currentmodule:: tweepy.asynchronous
-**************************************************************************
-:class:`tweepy.asynchronous.AsyncStream` --- Asynchronous Stream Reference
-**************************************************************************
+********************
+:class:`AsyncStream`
+********************
.. autoclass:: AsyncStream
:members:
.. currentmodule:: tweepy
-***************************************************
-:class:`tweepy.Client` --- Twitter API v2 Reference
-***************************************************
+***************
+:class:`Client`
+***************
.. autoclass:: Client
install.rst
getting_started.rst
authentication.rst
+ logging.rst
+ streaming.rst
+
+.. toctree::
+ :caption: Twitter API v1.1 Reference
+
api.rst
- client.rst
- models.rst
stream.rst
- streamingclient.rst
asyncstream.rst
exceptions.rst
+ v1_models.rst
+ v1_pagination.rst
+
+.. toctree::
+ :maxdepth: 1
+
extended_tweets.rst
- logging.rst
- pagination.rst
- streaming.rst
+
+.. toctree::
+ :caption: Twitter API v2 Reference
+
+ client.rst
+ streamingclient.rst
+ exceptions.rst
+ v2_models.rst
+ v2_pagination.rst
+
+.. toctree::
+ :caption: Meta
+ :maxdepth: 2
+
changelog.md
development.rst
examples.rst
+++ /dev/null
-.. _models_reference:
-
-****************
-Models Reference
-****************
-
-.. tabs::
-
- .. group-tab:: API v1.1
-
- .. class:: tweepy.models.BoundingBox
-
- :reference: https://developer.twitter.com/en/docs/twitter-api/v1/data-dictionary/object-model/geo#bounding-box
-
- .. class:: tweepy.models.DirectMessage
-
- :reference: https://developer.twitter.com/en/docs/twitter-api/v1/direct-messages/sending-and-receiving/guides/message-create-object
-
- .. class:: tweepy.models.Friendship
-
- :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/get-friendships-show#example-response
-
- .. class:: tweepy.models.List
-
- :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/get-lists-show#example-response
-
- .. class:: tweepy.models.Media
-
- :reference: https://developer.twitter.com/en/docs/twitter-api/v1/data-dictionary/object-model/entities#media
-
- .. class:: tweepy.models.Place
-
- :reference: https://developer.twitter.com/en/docs/twitter-api/v1/data-dictionary/object-model/geo#place
-
- .. class:: tweepy.models.Relationship
-
- :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/get-friendships-lookup#example-response
-
- .. class:: tweepy.models.SavedSearch
-
- :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/manage-account-settings/api-reference/get-saved_searches-show-id#example-response
-
- .. class:: tweepy.models.SearchResults
-
- :reference: https://developer.twitter.com/en/docs/twitter-api/v1/tweets/search/api-reference/get-search-tweets#example-response
-
- .. class:: tweepy.models.Status
-
- :reference: https://developer.twitter.com/en/docs/twitter-api/v1/data-dictionary/object-model/tweet
-
- .. class:: tweepy.models.User
-
- :reference: https://developer.twitter.com/en/docs/twitter-api/v1/data-dictionary/object-model/user
-
- .. group-tab:: API v2
-
- .. versionadded:: 4.0
-
- .. class:: tweepy.List
-
- .. versionadded:: 4.4
-
- :reference: https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/lists
-
- .. class:: tweepy.Media
-
- .. versionchanged:: 4.5
- Added ``url`` field
-
- :reference: https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/media
-
- .. class:: tweepy.Place
-
- :reference: https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/place
-
- .. class:: tweepy.Poll
-
- :reference: https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/poll
-
- .. class:: tweepy.ReferencedTweet
-
- :reference: https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/tweet
-
- .. class:: tweepy.Space
-
- .. versionadded:: 4.1
-
- .. versionchanged:: 4.4
- Added ``ended_at`` and ``topic_ids`` fields
-
- .. versionchanged:: 4.6
- Added ``subscriber_count`` field
-
- :reference: https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/space
-
- .. class:: tweepy.Tweet
-
- :reference: https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/tweet
-
- .. class:: tweepy.User
-
- :reference: https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/user
+++ /dev/null
-.. _pagination_guide:
-
-.. currentmodule:: tweepy
-
-**********
-Pagination
-**********
-
-.. tabs::
-
- .. group-tab:: API v1.1
-
- .. autoclass:: Cursor
- :members:
-
- .. group-tab:: API v2
-
- .. autoclass:: Paginator
- :members:
-
-Example
-=======
-
-.. tabs::
-
- .. group-tab:: API v1.1
-
- ::
-
- import tweepy
-
- auth = tweepy.OAuth2AppHandler("Consumer Key here", "Consumer Secret here")
- api = tweepy.API(auth)
-
- for status in tweepy.Cursor(api.search_tweets, "Tweepy",
- count=100).items(250):
- print(status.id)
-
- for page in tweepy.Cursor(api.get_followers, screen_name="TwitterDev",
- count=200).pages(5):
- print(len(page))
-
- .. group-tab:: API v2
-
- ::
-
- import tweepy
-
- client = tweepy.Client("Bearer Token here")
-
- for response in tweepy.Paginator(client.get_users_followers, 2244994945,
- max_results=1000, limit=5):
- print(response.meta)
-
- for tweet in tweepy.Paginator(client.search_recent_tweets, "Tweepy",
- max_results=100).flatten(limit=250):
- print(tweet.id)
.. currentmodule:: tweepy
-*****************************************************
-:class:`tweepy.Stream` --- Twitter API v1.1 Reference
-*****************************************************
+***************
+:class:`Stream`
+***************
.. autoclass:: Stream
:members:
.. currentmodule:: tweepy
-************************************************************
-:class:`tweepy.StreamingClient` --- Twitter API v2 Reference
-************************************************************
+************************
+:class:`StreamingClient`
+************************
.. autoclass:: StreamingClient
:members:
--- /dev/null
+.. _v1_models_reference:
+
+******
+Models
+******
+
+.. class:: tweepy.models.BoundingBox
+
+ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/data-dictionary/object-model/geo#bounding-box
+
+.. class:: tweepy.models.DirectMessage
+
+ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/direct-messages/sending-and-receiving/guides/message-create-object
+
+.. class:: tweepy.models.Friendship
+
+ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/get-friendships-show#example-response
+
+.. class:: tweepy.models.List
+
+ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/get-lists-show#example-response
+
+.. class:: tweepy.models.Media
+
+ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/data-dictionary/object-model/entities#media
+
+.. class:: tweepy.models.Place
+
+ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/data-dictionary/object-model/geo#place
+
+.. class:: tweepy.models.Relationship
+
+ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/get-friendships-lookup#example-response
+
+.. class:: tweepy.models.SavedSearch
+
+ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/manage-account-settings/api-reference/get-saved_searches-show-id#example-response
+
+.. class:: tweepy.models.SearchResults
+
+ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/tweets/search/api-reference/get-search-tweets#example-response
+
+.. class:: tweepy.models.Status
+
+ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/data-dictionary/object-model/tweet
+
+.. class:: tweepy.models.User
+
+ :reference: https://developer.twitter.com/en/docs/twitter-api/v1/data-dictionary/object-model/user
--- /dev/null
+.. _v1_pagination_guide:
+
+.. currentmodule:: tweepy
+
+**********
+Pagination
+**********
+
+.. autoclass:: Cursor
+ :members:
+
+Example
+=======
+
+::
+
+ import tweepy
+
+ auth = tweepy.OAuth2AppHandler("Consumer Key here", "Consumer Secret here")
+ api = tweepy.API(auth)
+
+ for status in tweepy.Cursor(api.search_tweets, "Tweepy",
+ count=100).items(250):
+ print(status.id)
+
+ for page in tweepy.Cursor(api.get_followers, screen_name="TwitterDev",
+ count=200).pages(5):
+ print(len(page))
--- /dev/null
+.. _v2_models_reference:
+
+******
+Models
+******
+
+.. versionadded:: 4.0
+
+.. class:: tweepy.List
+
+ .. versionadded:: 4.4
+
+ :reference: https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/lists
+
+.. class:: tweepy.Media
+
+ .. versionchanged:: 4.5
+ Added ``url`` field
+
+ :reference: https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/media
+
+.. class:: tweepy.Place
+
+ :reference: https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/place
+
+.. class:: tweepy.Poll
+
+ :reference: https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/poll
+
+.. class:: tweepy.ReferencedTweet
+
+ :reference: https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/tweet
+
+.. class:: tweepy.Space
+
+ .. versionadded:: 4.1
+
+ .. versionchanged:: 4.4
+ Added ``ended_at`` and ``topic_ids`` fields
+
+ .. versionchanged:: 4.6
+ Added ``subscriber_count`` field
+
+ :reference: https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/space
+
+.. class:: tweepy.Tweet
+
+ :reference: https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/tweet
+
+.. class:: tweepy.User
+
+ :reference: https://developer.twitter.com/en/docs/twitter-api/data-dictionary/object-model/user
--- /dev/null
+.. _v2_pagination_guide:
+
+.. currentmodule:: tweepy
+
+**********
+Pagination
+**********
+
+.. autoclass:: Paginator
+ :members:
+
+Example
+=======
+
+::
+
+ import tweepy
+
+ client = tweepy.Client("Bearer Token here")
+
+ for response in tweepy.Paginator(client.get_users_followers, 2244994945,
+ max_results=1000, limit=5):
+ print(response.meta)
+
+ for tweet in tweepy.Paginator(client.search_recent_tweets, "Tweepy",
+ max_results=100).flatten(limit=250):
+ print(tweet.id)