summaryrefslogtreecommitdiff
path: root/entities/agent.py
blob: ba99dac2f735f065230588e020d735aa1ca8ce01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import openapi_client
from typing import Dict

from .ship import Ship


class Agent:
    def __init__(self, agent_symbol, token):
        config = openapi_client.Configuration(access_token=token)
        self.api_client = openapi_client.ApiClient(config)

        self.agents_api = openapi_client.AgentsApi(self.api_client)
        self.fleet_api = openapi_client.FleetApi(self.api_client)
        self.systems_api = openapi_client.SystemsApi(self.api_client)

        self.agent_symbol = agent_symbol
        self.ships: Dict[str, Ship] = {}