bgg_api/src/modules/data_connection.py

26 lines
729 B
Python
Raw Normal View History

from src.modules import bgg_connection, db_connection
from src.classes import boardgame_classes, play_classes
def get_boardgame(boardgame_id: int) -> boardgame_classes.BoardGame:
#Will check if it already exists in db, then it will get it from there
return bgg_connection.get_boardgame(boardgame_id)
def get_user_owned_collection() -> list[boardgame_classes.BoardGame]:
return bgg_connection.get_user_owned_collection()
def get_user_wishlist_collection() -> list[boardgame_classes.BoardGame]:
return bgg_connection.get_user_wishlist_collection()
def get_plays() -> list[play_classes.Play]:
return bgg_connection.get_plays()
def create_db_and_tables():
db_connection.create_db_and_tables()