2023-06-11 18:51:03 +00:00
|
|
|
|
2023-06-13 20:29:04 +00:00
|
|
|
from .system_member import SystemMember
|
2023-06-11 18:51:03 +00:00
|
|
|
from typing import List
|
|
|
|
|
2023-06-13 20:29:04 +00:00
|
|
|
class Marketplace(SystemMember):
|
2023-06-11 18:51:03 +00:00
|
|
|
imports:List[str] = []
|
|
|
|
exports:List[str] = []
|
|
|
|
exchange:List[str] = []
|
|
|
|
|
|
|
|
def update(self, d):
|
|
|
|
self.setlst('imports', d, 'imports', 'symbol')
|
|
|
|
self.setlst('exports', d, 'exports', 'symbol')
|
|
|
|
self.setlst('exchange', d, 'exchange', 'symbol')
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def ext(self):
|
|
|
|
return 'mkt'
|
|
|
|
|
|
|
|
def path(self):
|
2023-06-12 20:36:58 +00:00
|
|
|
sector, system, _ = self.symbol.split('-')
|
|
|
|
return f'atlas/{sector}/{system[0:1]}/{system}/{self.symbol}.{self.ext()}'
|