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

15 lines
424 B
Python

import requests
from .card import Card
APIURL = "https://fftcg.square-enix-games.com/de/get-cards"
class Opus:
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"]]
def __str__(self):
return "\n".join(str(card) for card in self.__cards)