forked from uniborg/uniborg
load api key from module
This commit is contained in:
parent
d9e3240c5c
commit
dd086369ca
|
@ -1,6 +1,7 @@
|
||||||
venv
|
venv
|
||||||
__pycache__
|
__pycache__
|
||||||
|
|
||||||
|
api_key.py
|
||||||
*.session
|
*.session
|
||||||
*.session-journal
|
*.session-journal
|
||||||
data/
|
data/
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
id = 12345
|
||||||
|
hash = "11223344556677889900AABBCCDDEEFF"
|
|
@ -5,9 +5,16 @@
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from uniborg import Uniborg
|
from uniborg import Uniborg
|
||||||
|
import api_key
|
||||||
|
|
||||||
logging.basicConfig(level=logging.INFO)
|
logging.basicConfig(level=logging.INFO)
|
||||||
|
|
||||||
borg = Uniborg("stdborg", plugin_path="stdplugins", connection_retries=None)
|
borg = Uniborg(
|
||||||
|
"stdborg",
|
||||||
|
plugin_path="stdplugins",
|
||||||
|
connection_retries=None,
|
||||||
|
api_id=api_key.id,
|
||||||
|
api_hash=api_key.hash
|
||||||
|
)
|
||||||
|
|
||||||
borg.run_until_disconnected()
|
borg.run_until_disconnected()
|
||||||
|
|
Loading…
Reference in New Issue