|
|
@@ -80,7 +80,7 @@ def get_raw_prices() -> typing.Mapping[str, market.RawPrice]:
|
|
|
|
|
|
def get_total_buy(days: int) -> typing.Mapping[str, int]:
|
|
|
planets = [supply.Planet(fio_burn) for fio_burn in cache.get('https://rest.fnar.net/fioweb/burn/user/' + config.username,
|
|
|
- headers={'Authorization': config.fio_api_key})]
|
|
|
+ headers={'Authorization': config.fio_rest_key})]
|
|
|
|
|
|
total_consumption: dict[str, float] = collections.defaultdict(float)
|
|
|
for planet in planets:
|
|
|
@@ -101,14 +101,14 @@ def get_planet_exports_and_ship_storage() -> typing.Mapping[str, int]:
|
|
|
avail = collections.defaultdict(int)
|
|
|
|
|
|
fio_burn: typing.Sequence[supply.FIOBurn] = cache.get('https://rest.fnar.net/fioweb/burn/user/' + config.username,
|
|
|
- headers={'Authorization': config.fio_api_key})
|
|
|
+ headers={'Authorization': config.fio_rest_key})
|
|
|
for burn in fio_burn:
|
|
|
planet = supply.Planet(burn)
|
|
|
for mat in planet.exporting:
|
|
|
avail[mat] += planet.inventory.get(mat, 0)
|
|
|
|
|
|
stores: typing.Sequence[market.Storage] = cache.get('https://rest.fnar.net/storage/' + config.username,
|
|
|
- headers={'Authorization': config.fio_api_key})
|
|
|
+ headers={'Authorization': config.fio_rest_key})
|
|
|
for store in stores:
|
|
|
if store['Type'] != 'SHIP_STORE':
|
|
|
continue
|
|
|
@@ -119,7 +119,7 @@ def get_planet_exports_and_ship_storage() -> typing.Mapping[str, int]:
|
|
|
|
|
|
def get_bids() -> tuple[typing.Mapping[str, int], list[market.ExchangeOrder]]:
|
|
|
orders: typing.Sequence[market.ExchangeOrder] = cache.get('https://rest.fnar.net/cxos/' + config.username,
|
|
|
- headers={'Authorization': config.fio_api_key})
|
|
|
+ headers={'Authorization': config.fio_rest_key})
|
|
|
orders = [order for order in orders
|
|
|
if order['OrderType'] == 'BUYING' and order['Status'] != 'FILLED' and order['ExchangeCode'] == 'IC1']
|
|
|
|