Add env configuration for lurker.vibe
This commit is contained in:
parent
2ed360e42b
commit
da6c22d1f4
@ -1,2 +1,6 @@
|
||||
# lurker.vibe
|
||||
API_URL="https://localhost/api/presences"
|
||||
API_TOKEN="Bearer token"
|
||||
|
||||
# dbmate
|
||||
DATABASE_URL=""
|
||||
|
@ -1,3 +1,4 @@
|
||||
import os
|
||||
import sys
|
||||
import typing
|
||||
from datetime import datetime
|
||||
@ -10,8 +11,8 @@ from loguru import logger
|
||||
T = typing.TypeVar("T")
|
||||
FlushFunc = typing.Callable[[list[T]], typing.Coroutine[typing.Any, typing.Any, bool]]
|
||||
|
||||
API_URL = "https://requestbin.io/17ifjd71"
|
||||
API_TOKEN = ""
|
||||
API_URL = os.getenv("API_URL")
|
||||
API_TOKEN = os.getenv("API_TOKEN")
|
||||
|
||||
|
||||
class SpotifyRecord(typing.NamedTuple):
|
||||
@ -105,6 +106,10 @@ def main(argv: typing.Sequence[str]):
|
||||
print("Usage: lurker.py <token>")
|
||||
return 1
|
||||
|
||||
if not API_URL:
|
||||
print("Missing `API_URL` environment variable.")
|
||||
return 1
|
||||
|
||||
Bot().run(argv[0])
|
||||
return 0
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user