1
0
Fork 0
mirror of https://github.com/ldericher/fftcgtool synced 2025-01-15 23:03:00 +00:00
fftcgtool/fftcg/opus.py

16 lines
424 B
Python
Raw Normal View History

2021-08-03 17:45:35 +00:00
import requests
2021-08-02 23:55:12 +00:00
from .card import Card
2021-08-03 17:45:35 +00:00
APIURL = "https://fftcg.square-enix-games.com/de/get-cards"
2021-08-02 23:55:12 +00:00
class Opus:
2021-08-03 17:45:35 +00:00
def __init__(self, params):
# self.__cards = [Card(card_data) for card_data in data]
req = requests.post(APIURL, json=params)
self.__cards = [Card(card_data) for card_data in req.json()["cards"]]
2021-08-02 23:55:12 +00:00
def __str__(self):
return "\n".join(str(card) for card in self.__cards)