Skip to content

Commit

Permalink
Organize documentation arrangement
Browse files Browse the repository at this point in the history
Improve index / table of contents categorization
  • Loading branch information
Harmon758 committed Feb 25, 2022
1 parent 59fbf11 commit c5310d1
Show file tree
Hide file tree
Showing 12 changed files with 197 additions and 180 deletions.
6 changes: 3 additions & 3 deletions docs/api.rst
Expand Up @@ -4,9 +4,9 @@

.. include:: parameters.rst

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

.. autoclass:: API

Expand Down
6 changes: 3 additions & 3 deletions docs/asyncstream.rst
Expand Up @@ -2,9 +2,9 @@

.. currentmodule:: tweepy.asynchronous

**************************************************************************
:class:`tweepy.asynchronous.AsyncStream` --- Asynchronous Stream Reference
**************************************************************************
********************
:class:`AsyncStream`
********************

.. autoclass:: AsyncStream
:members:
Expand Down
6 changes: 3 additions & 3 deletions docs/client.rst
Expand Up @@ -2,9 +2,9 @@

.. currentmodule:: tweepy

***************************************************
:class:`tweepy.Client` --- Twitter API v2 Reference
***************************************************
***************
:class:`Client`
***************

.. autoclass:: Client

Expand Down
32 changes: 26 additions & 6 deletions docs/index.rst
Expand Up @@ -14,17 +14,37 @@ Contents:
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
Expand Down
102 changes: 0 additions & 102 deletions docs/models.rst

This file was deleted.

57 changes: 0 additions & 57 deletions docs/pagination.rst

This file was deleted.

6 changes: 3 additions & 3 deletions docs/stream.rst
Expand Up @@ -2,9 +2,9 @@

.. currentmodule:: tweepy

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

.. autoclass:: Stream
:members:
Expand Down
6 changes: 3 additions & 3 deletions docs/streamingclient.rst
Expand Up @@ -2,9 +2,9 @@

.. currentmodule:: tweepy

************************************************************
:class:`tweepy.StreamingClient` --- Twitter API v2 Reference
************************************************************
************************
:class:`StreamingClient`
************************

.. autoclass:: StreamingClient
:members:
Expand Down
49 changes: 49 additions & 0 deletions docs/v1_models.rst
@@ -0,0 +1,49 @@
.. _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
28 changes: 28 additions & 0 deletions docs/v1_pagination.rst
@@ -0,0 +1,28 @@
.. _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))

0 comments on commit c5310d1

Please sign in to comment.