diff --git a/docs/doctrees/apireference.doctree b/docs/doctrees/apireference.doctree index d680d3dc..c05672cc 100644 Binary files a/docs/doctrees/apireference.doctree and b/docs/doctrees/apireference.doctree differ diff --git a/docs/doctrees/environment.pickle b/docs/doctrees/environment.pickle index 4f557d01..133ab897 100644 Binary files a/docs/doctrees/environment.pickle and b/docs/doctrees/environment.pickle differ diff --git a/docs/doctrees/index.doctree b/docs/doctrees/index.doctree index 92d04b5b..3a92692f 100644 Binary files a/docs/doctrees/index.doctree and b/docs/doctrees/index.doctree differ diff --git a/docs/doctrees/packs/command.doctree b/docs/doctrees/packs/command.doctree index eaa917e4..34513208 100644 Binary files a/docs/doctrees/packs/command.doctree and b/docs/doctrees/packs/command.doctree differ diff --git a/docs/doctrees/packs/pack.doctree b/docs/doctrees/packs/pack.doctree index 5b106f60..ec7a0aef 100644 Binary files a/docs/doctrees/packs/pack.doctree and b/docs/doctrees/packs/pack.doctree differ diff --git a/docs/html/.buildinfo b/docs/html/.buildinfo index 4e51bfe5..b64492cb 100644 --- a/docs/html/.buildinfo +++ b/docs/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 59f01b51bca09082ff992b52b6e98cfc +config: 72c039d18ea46f966a2534df3d8861fa tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/html/_sources/packs/command.rst.txt b/docs/html/_sources/packs/command.rst.txt index 652c57be..c8e2efc4 100644 --- a/docs/html/_sources/packs/command.rst.txt +++ b/docs/html/_sources/packs/command.rst.txt @@ -1,6 +1,6 @@ .. currentmodule:: royalnet.commands -Adding a Command to the Pack +Creating a new Command ==================================== A Royalnet Command is a small script that is run whenever a specific message is sent to a Royalnet interface. @@ -327,7 +327,7 @@ if you want the command to raise an error if the number of results is greater th More Alchemy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -You can read more about :mod:`sqlalchemy` at their `website `_. +You can read more about sqlalchemy at their `website `_. Calling Events ------------------------------------ @@ -347,4 +347,9 @@ This section is not documented yet. Running repeating jobs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This section is not documented yet. \ No newline at end of file +This section is not documented yet. + +Adding the command to __init__.py +--------------------------------------------- + +This section is not documented yet. diff --git a/docs/html/_sources/packs/pack.rst.txt b/docs/html/_sources/packs/pack.rst.txt index 1fee19e0..7952d0fa 100644 --- a/docs/html/_sources/packs/pack.rst.txt +++ b/docs/html/_sources/packs/pack.rst.txt @@ -1,11 +1,15 @@ -Creating a Royalnet Pack +.. currentmodule:: royalnet + +Royalnet Packs ==================================== -This section is not documented yet. +A **Royalnet Pack** is a Python `module `_ that can be loaded in a +Royalnet instance to add more features, such as more commands, more webpages and more events. .. toctree:: - :maxdepth: 5 + :maxdepth: 1 + newpack command star event diff --git a/docs/html/_static/documentation_options.js b/docs/html/_static/documentation_options.js index 79964755..ae25aa96 100644 --- a/docs/html/_static/documentation_options.js +++ b/docs/html/_static/documentation_options.js @@ -1,6 +1,6 @@ var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '5.4a2', + VERSION: '5.6.2', LANGUAGE: 'None', COLLAPSE_INDEX: false, BUILDER: 'html', diff --git a/docs/html/apireference.html b/docs/html/apireference.html index 10194e00..9efa7566 100644 --- a/docs/html/apireference.html +++ b/docs/html/apireference.html @@ -8,7 +8,7 @@ - API Reference — Royalnet 5.4a2 documentation + API Reference — Royalnet 5.6.2 documentation @@ -60,7 +60,7 @@
- 5.4a2 + 5.6.2
@@ -85,7 +85,7 @@
    -
  • Creating a Royalnet Pack
  • +
  • Royalnet Packs
  • Random discoveries
  • API Reference
    • Alchemy
    • @@ -200,7 +200,7 @@ Check the tables submodule for more details.

      -get(table: Union[str, type]) → sqlalchemy.sql.schema.Table
      +get(table: Union[str, type]) → sqlalchemy.ext.declarative.api.DeclarativeMeta

      Get the table with a specified name or class.

      Parameters
      @@ -564,6 +564,17 @@ in the format (requ
      +
      +
      +async find_user(alias: str) → Optional[User]
      +

      Find the User having a specific Alias.

      +
      +
      Parameters
      +

      alias – the Alias to search for.

      +
      +
      +
      +
      async get_author(error_if_none: bool = False)
      @@ -911,14 +922,9 @@ As is the case with the logging module, it will be started on the first request register_events(events: List[Type[royalnet.commands.event.Event]], pack_cfg: Dict[str, Any])
      -
      -
      -register_exc_stars(exc_stars: List[Type[royalnet.constellation.star.ExceptionStar]], pack_cfg: Dict[str, Any])
      -
      -
      -register_page_stars(page_stars: List[Type[royalnet.constellation.star.PageStar]], pack_cfg: Dict[str, Any])
      +register_page_stars(page_stars: List[Type[royalnet.constellation.pagestar.PageStar]], pack_cfg: Dict[str, Any])
      @@ -945,13 +951,19 @@ As is the case with the logging module, it will be started on the first request

      The Starlette app.

      +
      +
      +stars = None
      +

      A list of all the PageStar registered to this Constellation.

      +
      +
      class royalnet.constellation.Star(interface: royalnet.commands.commandinterface.CommandInterface)

      A Star is a class representing a part of the website.

      -

      It shouldn’t be used directly: please use PageStar and ExceptionStar instead!

      +

      It shouldn’t be used directly: please use PageStar and ExceptionStar instead!

      property Session
      @@ -980,7 +992,7 @@ As is the case with the logging module, it will be started on the first request
      async page(request: starlette.requests.Request) → starlette.responses.Response

      The function generating the Response to a web Request.

      -

      If it raises an error, the corresponding ExceptionStar will be used to handle the request instead.

      +

      If it raises an error, the corresponding ExceptionStar will be used to handle the request instead.

      @@ -996,7 +1008,7 @@ As is the case with the logging module, it will be started on the first request class royalnet.constellation.PageStar(interface: royalnet.commands.commandinterface.CommandInterface)

      A PageStar is a class representing a single route of the website (for example, /api/user/get).

      To create a new website route you should create a new class inheriting from this class with a function overriding -page() and changing the values of path and optionally methods.

      +page(), path and optionally methods.

      methods = ['GET']
      @@ -1020,38 +1032,6 @@ As is the case with the logging module, it will be started on the first request
      -
      -
      -class royalnet.constellation.ExceptionStar(interface: royalnet.commands.commandinterface.CommandInterface)
      -

      An ExceptionStar is a class that handles an Exception raised by another star by returning a different -response than the one originally intended.

      -

      The handled exception type is specified in the error.

      -

      It can also handle standard webserver errors, such as 404 Not Found: -to handle them, set error to an int of the corresponding error code.

      -

      To create a new exception handler you should create a new class inheriting from this class with a function -overriding page() and changing the value of error.

      -
      -
      -error = None
      -

      The error that should be handled by this star. It should be either a subclass of Exception, -or the int of an HTTP error code.

      -

      Examples

      -
      error: int = 404
      -
      -
      -
      error: Type[Exception] = ValueError
      -
      -
      -
      - -
      - -
      -
      -royalnet.constellation.shoot(code: int, description: str) → starlette.responses.JSONResponse
      -

      Create a error JSONResponse with the passed error code and description.

      -
      -

      Herald

      diff --git a/docs/html/genindex.html b/docs/html/genindex.html index 13177ad1..50c4f228 100644 --- a/docs/html/genindex.html +++ b/docs/html/genindex.html @@ -9,7 +9,7 @@ - Index — Royalnet 5.4a2 documentation + Index — Royalnet 5.6.2 documentation @@ -60,7 +60,7 @@
      - 5.4a2 + 5.6.2
      @@ -85,7 +85,7 @@ @@ -321,8 +321,6 @@

      E

      - +
      -
    • register_exc_stars() (royalnet.constellation.Constellation method) -
    • register_page_stars() (royalnet.constellation.Constellation method)
    • reply() (royalnet.commands.CommandData method) @@ -635,10 +631,10 @@
    • royalnet.alchemy (module)
    • -
      • royalnet.bard (module)
      • royalnet.commands (module) @@ -724,14 +720,14 @@
      • session_commit() (royalnet.commands.CommandData method)
      • set_ytdlinfo_from_id3_tags() (royalnet.bard.YtdlFile method) -
      • -
      • shoot() (in module royalnet.constellation)
      • sleep_until() (in module royalnet.utils)
      • Star (class in royalnet.constellation)
      • starlette (royalnet.constellation.Constellation attribute) +
      • +
      • stars (royalnet.constellation.Constellation attribute)
      • syntax (royalnet.commands.Command attribute)
      • diff --git a/docs/html/index.html b/docs/html/index.html index c4bfae23..8e0035a2 100644 --- a/docs/html/index.html +++ b/docs/html/index.html @@ -8,7 +8,7 @@ - Royalnet — Royalnet 5.4a2 documentation + Royalnet — Royalnet 5.6.2 documentation @@ -36,7 +36,7 @@ - + @@ -60,7 +60,7 @@
        - 5.4a2 + 5.6.2
        @@ -85,7 +85,7 @@ @@ -157,55 +157,9 @@

        Welcome to the documentation of Royalnet!