Renamed RandomCard to Random for ease of use. Also some stuff to autocomplete.

This commit is contained in:
Nanda Scott 2018-01-30 19:32:39 -05:00
parent 7ab602cec7
commit 958cdaae89
3 changed files with 6 additions and 6 deletions

View File

@ -4,4 +4,4 @@ from .cardid import Id
from .mtgo import Mtgo from .mtgo import Mtgo
from .multiverse import Multiverse from .multiverse import Multiverse
from .named import Named from .named import Named
from .randomcard import RandomCard from .randomcard import Random

View File

@ -15,10 +15,10 @@ class Autocomplete(object):
""" """
def __init__(self, query, pretty=None, _format=None): def __init__(self, query, **kwargs):
self.query = query self.query = query
self.pretty = pretty self.pretty = kwargs.get('pretty')
self.format = _format self.format = kwargs.get('format')
loop = asyncio.get_event_loop() loop = asyncio.get_event_loop()
self.session = aiohttp.ClientSession(loop=loop) self.session = aiohttp.ClientSession(loop=loop)

View File

@ -1,8 +1,8 @@
from .scryfall_object import ScryfallObject from .scryfall_object import ScryfallObject
class RandomCard(ScryfallObject): class Random(ScryfallObject):
"""This will return a random card. No parameters are passed while creating.""" """This will return a random card. No parameters are passed while creating."""
def __init__(self): def __init__(self):
self.url = 'cards/random' self.url = 'cards/random'
super(RandomCard, self).__init__(self.url) super(Random, self).__init__(self.url)