From 92c6a636198971212567edde06681fe45c15170c Mon Sep 17 00:00:00 2001 From: Harmon Date: Sat, 19 Feb 2022 21:26:29 -0600 Subject: [PATCH] Use Intersphinx linking in Streaming documentation --- docs/streaming.rst | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/docs/streaming.rst b/docs/streaming.rst index f77e33a..3f32d0d 100644 --- a/docs/streaming.rst +++ b/docs/streaming.rst @@ -46,9 +46,8 @@ example, if a Tweet is received from the stream, the raw data is sent to :meth:`Stream.on_data`, which constructs a :class:`Status` object and passes it to :meth:`Stream.on_status`. By default, the other methods, besides :meth:`Stream.on_data`, that receive the data from the stream, simply log the -data received, with the `logging level`_ dependent on the type of the data. - -.. _logging level: https://docs.python.org/3/howto/logging.html#logging-levels +data received, with the :ref:`logging level ` dependent on the +type of the data. To customize the processing of the stream data, :class:`Stream` needs to be subclassed. For example, to print the IDs of every Tweet received:: @@ -68,13 +67,12 @@ subclassed. For example, to print the IDs of every Tweet received:: Threading ========= Both :meth:`Stream.filter` and :meth:`Stream.sample` have a ``threaded`` -parameter. When set to ``True``, the stream will run in a separate `thread`_, -which is returned by the call to either method. For example:: +parameter. When set to ``True``, the stream will run in a separate +:ref:`thread `, which is returned by the call to either +method. For example:: thread = stream.filter(follow=[1072250532645998596], threaded=True) -.. _thread: https://docs.python.org/3/library/threading.html#thread-objects - Handling Errors =============== :class:`Stream` has multiple methods to handle errors during streaming. -- 2.25.1