Renamed RandomCard to Random for ease of use. Also some stuff to autocomplete.
This commit is contained in:
parent
7ab602cec7
commit
958cdaae89
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue