file and folder organization, removal of monoliths

This commit is contained in:
2025-11-25 14:34:32 -05:00
parent 93a5da75eb
commit f5fa1cd703
12 changed files with 188 additions and 301 deletions

12
services/torn_api.py Normal file
View File

@@ -0,0 +1,12 @@
import aiohttp
from config import TORN_API_KEY, ENEMY_FACTION_ID
async def fetch_enemy_members():
url = f"https://api.torn.com/v2/faction/{ENEMY_FACTION_ID}?selections=members&key={TORN_API_KEY}"
async with aiohttp.ClientSession() as session:
async with session.get(url) as resp:
if resp.status != 200:
print("Torn faction fetch error:", resp.status)
return []
data = await resp.json()
return data.get("members", [])