summaryrefslogtreecommitdiff
path: root/entities/agent.py
diff options
context:
space:
mode:
authorBotond Hende <nettingman@gmail.com>2024-09-02 00:21:13 +0200
committerBotond Hende <nettingman@gmail.com>2024-09-02 00:21:13 +0200
commit1638f40eccc4a1321ee1bf19e3756157b6c965e1 (patch)
tree99209de68ebcd4f42cafcdf14e563d7916d69e00 /entities/agent.py
parent3a390ff218903b8665a99f94d7f3a65357b6e96d (diff)
refactored code, use get_ship dependency for ship related calls
Diffstat (limited to 'entities/agent.py')
-rw-r--r--entities/agent.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/entities/agent.py b/entities/agent.py
new file mode 100644
index 0000000..ba99dac
--- /dev/null
+++ b/entities/agent.py
@@ -0,0 +1,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] = {}