diff --git a/lnbits/extensions/twitchalerts/README.md b/lnbits/extensions/streamalerts/README.md similarity index 75% rename from lnbits/extensions/twitchalerts/README.md rename to lnbits/extensions/streamalerts/README.md index a55ed4a9..18910f14 100644 --- a/lnbits/extensions/twitchalerts/README.md +++ b/lnbits/extensions/streamalerts/README.md @@ -1,10 +1,10 @@

Example Extension

*tagline*

-The TwitchAlerts extension allows you to integrate Bitcoin Lightning (and on-chain) paymnents in to your existing Streamlabs alerts! +The StreamAlerts extension allows you to integrate Bitcoin Lightning (and on-chain) paymnents in to your existing Streamlabs alerts! Try to include an image

If your extension has API endpoints, include useful ones here

-curl -H "Content-type: application/json" -X POST https://YOUR-LNBITS/YOUR-EXTENSION/api/v1/EXAMPLE -d '{"amount":"100","memo":"TwitchAlerts"}' -H "X-Api-Key: YOUR_WALLET-ADMIN/INVOICE-KEY" +curl -H "Content-type: application/json" -X POST https://YOUR-LNBITS/YOUR-EXTENSION/api/v1/EXAMPLE -d '{"amount":"100","memo":"StreamAlerts"}' -H "X-Api-Key: YOUR_WALLET-ADMIN/INVOICE-KEY" diff --git a/lnbits/extensions/twitchalerts/__init__.py b/lnbits/extensions/streamalerts/__init__.py similarity index 50% rename from lnbits/extensions/twitchalerts/__init__.py rename to lnbits/extensions/streamalerts/__init__.py index e8ba90e1..72f0ae7c 100644 --- a/lnbits/extensions/twitchalerts/__init__.py +++ b/lnbits/extensions/streamalerts/__init__.py @@ -1,10 +1,10 @@ from quart import Blueprint from lnbits.db import Database -db = Database("ext_twitchalerts") +db = Database("ext_streamalerts") -twitchalerts_ext: Blueprint = Blueprint( - "twitchalerts", __name__, static_folder="static", template_folder="templates" +streamalerts_ext: Blueprint = Blueprint( + "streamalerts", __name__, static_folder="static", template_folder="templates" ) from .views_api import * # noqa diff --git a/lnbits/extensions/twitchalerts/config.json b/lnbits/extensions/streamalerts/config.json similarity index 84% rename from lnbits/extensions/twitchalerts/config.json rename to lnbits/extensions/streamalerts/config.json index f9105475..2fbcc55e 100644 --- a/lnbits/extensions/twitchalerts/config.json +++ b/lnbits/extensions/streamalerts/config.json @@ -1,5 +1,5 @@ { - "name": "Twitch Alerts", + "name": "Stream Alerts", "short_description": "Integrate Bitcoin donations into your stream alerts!", "icon": "notifications_active", "contributors": ["Fittiboy"] diff --git a/lnbits/extensions/twitchalerts/crud.py b/lnbits/extensions/streamalerts/crud.py similarity index 98% rename from lnbits/extensions/twitchalerts/crud.py rename to lnbits/extensions/streamalerts/crud.py index e59d5696..902b74df 100644 --- a/lnbits/extensions/twitchalerts/crud.py +++ b/lnbits/extensions/streamalerts/crud.py @@ -17,7 +17,7 @@ from lnbits.core.crud import get_wallet async def get_service_redirect_uri(request, service_id): """Return the service's redirect URI, to be given to the third party API""" uri_base = request.scheme + "://" - uri_base += request.headers["Host"] + "/twitchalerts/api/v1" + uri_base += request.headers["Host"] + "/streamalerts/api/v1" redirect_uri = uri_base + f"/authenticate/{service_id}" return redirect_uri @@ -191,7 +191,7 @@ async def authenticate_service(service_id, code, redirect_uri): print(response) token = response["access_token"] success = await service_add_token(service_id, token) - return f"/twitchalerts/?usr={user}", success + return f"/streamalerts/?usr={user}", success async def service_add_token(service_id, token): diff --git a/lnbits/extensions/twitchalerts/migrations.py b/lnbits/extensions/streamalerts/migrations.py similarity index 100% rename from lnbits/extensions/twitchalerts/migrations.py rename to lnbits/extensions/streamalerts/migrations.py diff --git a/lnbits/extensions/twitchalerts/models.py b/lnbits/extensions/streamalerts/models.py similarity index 100% rename from lnbits/extensions/twitchalerts/models.py rename to lnbits/extensions/streamalerts/models.py diff --git a/lnbits/extensions/twitchalerts/templates/twitchalerts/_api_docs.html b/lnbits/extensions/streamalerts/templates/streamalerts/_api_docs.html similarity index 90% rename from lnbits/extensions/twitchalerts/templates/twitchalerts/_api_docs.html rename to lnbits/extensions/streamalerts/templates/streamalerts/_api_docs.html index 540fcaee..33b52f15 100644 --- a/lnbits/extensions/twitchalerts/templates/twitchalerts/_api_docs.html +++ b/lnbits/extensions/streamalerts/templates/streamalerts/_api_docs.html @@ -1,7 +1,7 @@

- Twitch Alerts: Integrate Bitcoin into your stream alerts! + Stream Alerts: Integrate Bitcoin into your stream alerts!

Accept Bitcoin donations on Twitch, and integrate them into your alerts. diff --git a/lnbits/extensions/twitchalerts/templates/twitchalerts/display.html b/lnbits/extensions/streamalerts/templates/streamalerts/display.html similarity index 97% rename from lnbits/extensions/twitchalerts/templates/twitchalerts/display.html rename to lnbits/extensions/streamalerts/templates/streamalerts/display.html index 24be2ad3..34a2e530 100644 --- a/lnbits/extensions/twitchalerts/templates/twitchalerts/display.html +++ b/lnbits/extensions/streamalerts/templates/streamalerts/display.html @@ -76,7 +76,7 @@ Invoice: function () { var self = this axios - .post('/twitchalerts/api/v1/donations', { + .post('/streamalerts/api/v1/donations', { service: {{ service }}, name: self.donationDialog.data.name, sats: self.donationDialog.data.sats, diff --git a/lnbits/extensions/twitchalerts/templates/twitchalerts/index.html b/lnbits/extensions/streamalerts/templates/streamalerts/index.html similarity index 94% rename from lnbits/extensions/twitchalerts/templates/twitchalerts/index.html rename to lnbits/extensions/streamalerts/templates/streamalerts/index.html index 73e867ed..728350ec 100644 --- a/lnbits/extensions/twitchalerts/templates/twitchalerts/index.html +++ b/lnbits/extensions/streamalerts/templates/streamalerts/index.html @@ -151,11 +151,11 @@

-
LNbits Twitch Alerts extension
+
LNbits Stream Alerts extension
- {% include "twitchalerts/_api_docs.html" %} + {% include "streamalerts/_api_docs.html" %}
@@ -229,14 +229,14 @@ {% endblock %} {% block scripts %} {{ window_vars(user) }}