color identity in pull sheet

This commit is contained in:
2025-05-31 12:51:25 -04:00
parent fa089adb53
commit 7bc64115f2
5 changed files with 81 additions and 6 deletions

View File

@ -0,0 +1,11 @@
from app.services.external_api.base_external_service import BaseExternalService
class ScryfallService(BaseExternalService):
def __init__(self):
super().__init__(base_url="https://api.scryfall.com/")
async def get_color_identity(self, scryfall_id: str) -> str:
"""Get the color identity of a card from Scryfall API"""
endpoint = f"cards/{scryfall_id}"
results = await self._make_request("GET", endpoint)
return results['color_identity']