mirror of https://git.envs.net/envs/twtxt.git
Add api page to documentation
This commit is contained in:
parent
062f9ae54f
commit
4356f7b626
|
@ -0,0 +1,43 @@
|
|||
.. _api:
|
||||
|
||||
API
|
||||
===
|
||||
|
||||
.. module:: twtxt
|
||||
|
||||
This chapter documents twtxts API and source code internals.
|
||||
|
||||
Tweet Class
|
||||
-----------
|
||||
|
||||
.. autoclass:: models.Tweet
|
||||
:members:
|
||||
|
||||
.. attribute:: text
|
||||
|
||||
A :class:`str` representing the message of the tweet.
|
||||
|
||||
.. attribute:: created_at
|
||||
|
||||
A :class:`datetime` representing the creation date of the tweet.
|
||||
A value in the future results in an error log.
|
||||
|
||||
|
||||
Source Class
|
||||
------------
|
||||
|
||||
.. autoclass:: models.Source
|
||||
:members:
|
||||
|
||||
.. attribute:: nick
|
||||
|
||||
A :class:`str` representing the nick name of the Source.
|
||||
|
||||
.. attribute:: url
|
||||
|
||||
A :class:`str` representing the URL to the sources twtxt file (feed URL).
|
||||
|
||||
.. attribute:: file
|
||||
|
||||
A :class:`str` representing a path to the local twtxt file if available.
|
||||
This is attribute is only needed for the users own feed.
|
|
@ -19,7 +19,7 @@ import shlex
|
|||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#sys.path.insert(0, os.path.abspath('.'))
|
||||
sys.path.insert(0, os.path.abspath('../twtxt'))
|
||||
|
||||
# -- General configuration ------------------------------------------------
|
||||
|
||||
|
@ -176,7 +176,7 @@ html_static_path = ['_static']
|
|||
#html_show_sourcelink = True
|
||||
|
||||
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
||||
#html_show_sphinx = True
|
||||
html_show_sphinx = False
|
||||
|
||||
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
||||
#html_show_copyright = True
|
||||
|
|
|
@ -8,7 +8,8 @@ twtxt from the CLI. The internals of twtxt are documented in the :ref:`api` chap
|
|||
|
||||
Feel free to contribute to this project. The source code is maintained on `Github`_.
|
||||
|
||||
Contents:
|
||||
User's Guide
|
||||
------------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
@ -21,4 +22,15 @@ Contents:
|
|||
twtxtfile
|
||||
|
||||
|
||||
API Reference
|
||||
-------------
|
||||
|
||||
This part of the documentation describes the modules, classes, functions and other source code specific details.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
api
|
||||
|
||||
|
||||
.. _Github: https://github.com/buckket/twtxt
|
||||
|
|
Loading…
Reference in New Issue