diff --git a/litecord/blueprints/__init__.py b/litecord/blueprints/__init__.py new file mode 100644 index 0000000..6114c6c --- /dev/null +++ b/litecord/blueprints/__init__.py @@ -0,0 +1 @@ +from .gateway import bp as gateway diff --git a/litecord/blueprints/gateway.py b/litecord/blueprints/gateway.py new file mode 100644 index 0000000..7cdff33 --- /dev/null +++ b/litecord/blueprints/gateway.py @@ -0,0 +1,10 @@ +from quart import Blueprint, jsonify + +bp = Blueprint('gateway', __name__) + + +@bp.route('/gateway') +def api_gateway(): + return jsonify({"url": "..."}) + +# TODO: /gateway/bot (requires token) diff --git a/run.py b/run.py index f570da2..d561487 100644 --- a/run.py +++ b/run.py @@ -1,9 +1,10 @@ import logging import asyncpg -from quart import Quart, g +from quart import Quart, g, Blueprint import config +from litecord.blueprints import gateway logging.basicConfig(level=logging.INFO) log = logging.getLogger(__name__) @@ -16,6 +17,7 @@ def make_app(): app = make_app() +app.register_blueprint(gateway, url_prefix='/api/v6') @app.before_serving