Scrython/scrython/cards/multiverse.py

27 lines
741 B
Python
Raw Normal View History

from .cards_object import CardsObject
class Multiverse(CardsObject):
2018-10-22 14:19:38 +00:00
"""
cards/multiverse
Get a card by Multiverse id
2018-02-21 19:42:58 +00:00
2018-10-22 14:19:38 +00:00
Positional arguments:
id : str ....... This is the associated multiverse id of the given card.
2018-02-21 19:42:58 +00:00
2018-10-22 14:19:38 +00:00
Optional arguments:
Inherits all arguments from CardsObject
2018-02-21 19:42:58 +00:00
2018-10-22 14:19:38 +00:00
Attributes:
Inherits all attributes from CardsObject
2018-02-21 19:42:58 +00:00
2018-10-22 14:19:38 +00:00
Example usage:
>>> card = scrython.cards.Multiverse(id='96865')
>>> card.name()
"""
def __init__(self, **kwargs):
if kwargs.get('id') is None:
raise TypeError('No id provided to search by')
2018-02-14 02:02:48 +00:00
2018-10-22 14:19:38 +00:00
self.url = 'cards/multiverse/{}?'.format(str(kwargs.get('id')))
super(Multiverse, self).__init__(self.url)