diff --git a/cards/__init__.py b/cards/__init__.py index 08911e0..f0f191d 100644 --- a/cards/__init__.py +++ b/cards/__init__.py @@ -4,4 +4,4 @@ from .cardid import Id from .mtgo import Mtgo from .multiverse import Multiverse from .named import Named -from .randomcard import RandomCard +from .randomcard import Random diff --git a/cards/autocomplete.py b/cards/autocomplete.py index 40a8acf..99517b7 100644 --- a/cards/autocomplete.py +++ b/cards/autocomplete.py @@ -15,10 +15,10 @@ class Autocomplete(object): """ - def __init__(self, query, pretty=None, _format=None): + def __init__(self, query, **kwargs): self.query = query - self.pretty = pretty - self.format = _format + self.pretty = kwargs.get('pretty') + self.format = kwargs.get('format') loop = asyncio.get_event_loop() self.session = aiohttp.ClientSession(loop=loop) diff --git a/cards/randomcard.py b/cards/randomcard.py index 0bdc1ce..ac16cba 100644 --- a/cards/randomcard.py +++ b/cards/randomcard.py @@ -1,8 +1,8 @@ from .scryfall_object import ScryfallObject -class RandomCard(ScryfallObject): +class Random(ScryfallObject): """This will return a random card. No parameters are passed while creating.""" def __init__(self): self.url = 'cards/random' - super(RandomCard, self).__init__(self.url) + super(Random, self).__init__(self.url)