2025-04-12 16:37:06 +02:00
|
|
|
from dto.requests import GameStartRequestDTO
|
|
|
|
from services.extractor import run_extraction_chain
|
|
|
|
from services.julius_baer_api_client import JuliusBaerApiClient
|
|
|
|
from validation.from_passport import FromPassport
|
2025-04-12 12:51:13 +02:00
|
|
|
|
2025-04-12 16:37:06 +02:00
|
|
|
from services.player import Player
|
|
|
|
from utils.parsers import process_passport
|
2025-04-11 22:42:54 +02:00
|
|
|
from flask import Flask
|
2025-04-12 12:51:13 +02:00
|
|
|
import config
|
2025-04-12 02:15:19 +02:00
|
|
|
|
2025-04-11 22:42:54 +02:00
|
|
|
app = Flask(__name__)
|
2025-04-12 16:58:01 +02:00
|
|
|
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - [%(module)s] - %(message)s')
|
2025-04-11 22:42:54 +02:00
|
|
|
|
|
|
|
|
|
|
|
@app.route('/')
|
2025-04-12 16:37:06 +02:00
|
|
|
def hello_world():
|
2025-04-11 22:42:54 +02:00
|
|
|
return 'Hello World!'
|
|
|
|
|
2025-04-12 16:58:41 +02:00
|
|
|
|
2025-04-11 22:42:54 +02:00
|
|
|
if __name__ == '__main__':
|
2025-04-12 16:37:06 +02:00
|
|
|
jb_client = JuliusBaerApiClient()
|
|
|
|
game_start_request = GameStartRequestDTO(player_name=config.API_TEAM)
|
|
|
|
res = jb_client.start_game(game_start_request)
|
|
|
|
|
2025-04-12 16:58:41 +02:00
|
|
|
result = extract_profile(res.client_data)
|
2025-04-12 12:59:36 +02:00
|
|
|
|
|
|
|
player = Player()
|
|
|
|
player.play_on_separate_thread()
|
2025-04-12 02:15:19 +02:00
|
|
|
|
2025-04-11 22:42:54 +02:00
|
|
|
app.run()
|