Migrate from github to gitea + some improvements

This commit is contained in:
2022-09-18 00:39:03 +02:00
parent 594b532fe7
commit 7595d42f9a
15 changed files with 44 additions and 74 deletions

View File

@@ -19,7 +19,7 @@ from dotenv import load_dotenv
load_dotenv() # loads environment vars
# note: for more information about the api visit swagger documentation on https://gruppe1.testsites.info/api/docs#/
# note: for more information about the api visit swagger documentation on os.getenv("API_URL")/docs#/
class API_Handler:
"""class for interacting with the api webservice
@@ -392,7 +392,7 @@ class API_Handler:
if __name__ == "__main__": # editable, just for basic on the go testing of new functions
print("This is a module for the telegram bot. It is not intended to be run directly.")
handler = API_Handler("https://gruppe1.testsites.info/api", str(os.getenv("BOT_EMAIL")), str(os.getenv("BOT_PASSWORD"))) # get creds from env
handler = API_Handler(os.getenv("API_URL"), str(os.getenv("BOT_EMAIL")), str(os.getenv("BOT_PASSWORD"))) # get creds from env
print(handler.token)
keywords = handler.get_user_keywords(user_id=1709356058) # user_id here is currently mine (Linus)
print(keywords)