Skip to content

Commit

Permalink
feat: add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Oct 30, 2022
1 parent 73df32a commit afc563a
Show file tree
Hide file tree
Showing 9 changed files with 101 additions and 31 deletions.
6 changes: 6 additions & 0 deletions docs/source/api/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
API
======

.. autoclass:: gotrue._async.api.AsyncGoTrueAPI
:inherited-members:

9 changes: 9 additions & 0 deletions docs/source/api/client.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Client
======

The entrypoint to the library is the Client class. To interact with the Gotrue API, you make an instance of this class.


.. autoclass:: gotrue.AsyncGoTrueClient
:members:
:inherited-members:
14 changes: 14 additions & 0 deletions docs/source/api/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
API Reference
=============

.. note::
The library offers both synchronous and asynchronous clients.
Note that the synchronous and asynchronous classes all provide the exact same interface.
Only the async client and it's methods are documented here.

.. toctree::
:maxdepth: 2
:caption: API Reference:

Client <client>
API <api>
14 changes: 10 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,29 @@
# -- Project information -----------------------------------------------------

project = "gotrue"
copyright = "2021, Joel Lee"
author = "Joel Lee"
copyright = (
"2022, Anand Krishna, Daniel Reinón García, Joel Lee, Leynier Gutiérrez González"
)
author = "Anand Krishna, Daniel Reinón García, Joel Lee, Leynier Gutiérrez González"

# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = []
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx.ext.extlinks",
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# -- Options for HTML output -------------------------------------------------

Expand Down
53 changes: 53 additions & 0 deletions docs/source/gotrue.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
gotrue package
==============

Submodules
----------

gotrue.constants module
-----------------------

.. automodule:: gotrue.constants
:members:
:undoc-members:
:show-inheritance:

gotrue.exceptions module
------------------------

.. automodule:: gotrue.exceptions
:members:
:undoc-members:
:show-inheritance:

gotrue.helpers module
---------------------

.. automodule:: gotrue.helpers
:members:
:undoc-members:
:show-inheritance:

gotrue.http\_clients module
---------------------------

.. automodule:: gotrue.http_clients
:members:
:undoc-members:
:show-inheritance:

gotrue.types module
-------------------

.. automodule:: gotrue.types
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: gotrue
:members:
:undoc-members:
:show-inheritance:
4 changes: 2 additions & 2 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Welcome to gotrue's documentation!
:maxdepth: 2
:caption: Contents:

usage/client
usage/admin
API Reference </api/index>
Examples </examples/index>



Expand Down
7 changes: 7 additions & 0 deletions docs/source/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
gotrue-py
=========

.. toctree::
:maxdepth: 4

gotrue
19 changes: 0 additions & 19 deletions docs/source/usage/admin.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/source/usage/client.rst

This file was deleted.

0 comments on commit afc563a

Please sign in to comment.