docs: split API docs into multiple documents

This commit is contained in:
bastimeyer 2023-06-24 06:13:23 +02:00 committed by Sebastian Meyer
parent 272a846e6d
commit fa8139d147
8 changed files with 90 additions and 96 deletions

View File

@ -1,97 +1,12 @@
API Reference
=============
This is a reference of all the available API methods in Streamlink.
This is an incomplete reference of the relevant Streamlink APIs.
.. toctree::
Streamlink
------------
.. autofunction:: streamlink.streams
Session
-------
.. autoclass:: streamlink.Streamlink
:member-order: bysource
Plugins
-------
Plugin
^^^^^^
.. module:: streamlink.plugin
.. autoclass:: Plugin
:private-members: _get_streams
:member-order: bysource
Plugin decorators
^^^^^^^^^^^^^^^^^
.. autodecorator:: pluginmatcher
.. autodecorator:: pluginargument
Plugin arguments
^^^^^^^^^^^^^^^^
.. module:: streamlink.options
.. autoclass:: Argument
.. autoclass:: Arguments
Streams
-------
.. module:: streamlink.stream
All streams inherit from the :class:`Stream` class.
Stream
^^^^^^
.. autoclass:: Stream
MuxedStream
^^^^^^^^^^^
.. autoclass:: MuxedStream
HTTPStream
^^^^^^^^^^
.. autoclass:: HTTPStream
HLSStream
^^^^^^^^^
.. autoclass:: HLSStream
MuxedHLSStream
^^^^^^^^^^^^^^
.. autoclass:: MuxedHLSStream
DASHStream
^^^^^^^^^^
.. autoclass:: DASHStream
Exceptions
----------
Streamlink has multiple types of exceptions:
.. autoexception:: streamlink.exceptions.StreamlinkError
.. autoexception:: streamlink.exceptions.PluginError
.. autoexception:: streamlink.exceptions.FatalPluginError
.. autoexception:: streamlink.exceptions.NoPluginError
.. autoexception:: streamlink.exceptions.NoStreamsError
.. autoexception:: streamlink.exceptions.StreamError
api/streamlink
api/session
api/plugin
api/stream
api/exceptions

9
docs/api/exceptions.rst Normal file
View File

@ -0,0 +1,9 @@
Exceptions
----------
.. autoexception:: streamlink.exceptions.StreamlinkError
.. autoexception:: streamlink.exceptions.PluginError
.. autoexception:: streamlink.exceptions.FatalPluginError
.. autoexception:: streamlink.exceptions.NoPluginError
.. autoexception:: streamlink.exceptions.NoStreamsError
.. autoexception:: streamlink.exceptions.StreamError

24
docs/api/plugin.rst Normal file
View File

@ -0,0 +1,24 @@
Plugin
------
.. module:: streamlink.plugin
.. autoclass:: Plugin
:private-members: _get_streams
:member-order: bysource
Plugin decorators
^^^^^^^^^^^^^^^^^
.. autodecorator:: pluginmatcher
.. autodecorator:: pluginargument
Plugin arguments
^^^^^^^^^^^^^^^^
.. module:: streamlink.options
.. autoclass:: Argument
.. autoclass:: Arguments

5
docs/api/session.rst Normal file
View File

@ -0,0 +1,5 @@
Session
-------
.. autoclass:: streamlink.session.Streamlink
:member-order: bysource

36
docs/api/stream.rst Normal file
View File

@ -0,0 +1,36 @@
Streams
-------
.. module:: streamlink.stream
All streams inherit from the :class:`Stream` class.
Stream
^^^^^^
.. autoclass:: Stream
MuxedStream
^^^^^^^^^^^
.. autoclass:: MuxedStream
HTTPStream
^^^^^^^^^^
.. autoclass:: HTTPStream
HLSStream
^^^^^^^^^
.. autoclass:: HLSStream
MuxedHLSStream
^^^^^^^^^^^^^^
.. autoclass:: MuxedHLSStream
DASHStream
^^^^^^^^^^
.. autoclass:: DASHStream

4
docs/api/streamlink.rst Normal file
View File

@ -0,0 +1,4 @@
Streamlink
----------
.. autofunction:: streamlink.streams

View File

@ -58,7 +58,7 @@ Inspecting streams
------------------
It's also possible to inspect the stream's internal parameters. Go to
:ref:`Stream subclasses <api:Streams>` to see which attributes are available
:ref:`Stream subclasses <api/stream:Streams>` to see which attributes are available
for inspection for each stream type.
For example, this is a :py:class:`HLSStream <streamlink.stream.HLSStream>` object which

View File

@ -87,7 +87,7 @@ streamlink 3.0.0
Removal of separate https-proxy option
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:ref:`HTTPS proxy CLI option <cli:HTTP options>` and the respective :ref:`Session options <api:Session>`
:ref:`HTTPS proxy CLI option <cli:HTTP options>` and the respective :ref:`Session options <api/session:Session>`
have been deprecated in favor of a single :option:`--http-proxy` that sets the proxy for all HTTP and
HTTPS requests, including WebSocket connections.
@ -98,8 +98,9 @@ streamlink 2.4.0
Stream-type related CLI arguments
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
:ref:`Stream-type related CLI arguments <cli:Stream transport options>` and the respective :ref:`Session options <api:Session>`
have been deprecated in favor of existing generic arguments/options, to avoid redundancy and potential confusion.
:ref:`Stream-type related CLI arguments <cli:Stream transport options>` and the respective
:ref:`Session options <api/session:Session>` have been deprecated in favor of existing generic arguments/options,
to avoid redundancy and potential confusion.
- use :option:`--stream-segment-attempts` instead of ``--{dash,hds,hls}-segment-attempts``
- use :option:`--stream-segment-threads` instead of ``--{dash,hds,hls}-segment-threads``