2018-02-07 03:01:08 +00:00
|
|
|
from .cards_object import CardsObject
|
2018-01-30 03:54:20 +00:00
|
|
|
import urllib.parse
|
2018-01-11 03:04:03 +00:00
|
|
|
|
2018-02-07 03:01:08 +00:00
|
|
|
class Mtgo(CardsObject):
|
2018-10-22 14:19:38 +00:00
|
|
|
"""
|
|
|
|
cards/mtgo
|
|
|
|
Get a card by MTGO id.
|
2018-02-21 19:42:58 +00:00
|
|
|
|
2018-10-22 14:19:38 +00:00
|
|
|
Positional arguments:
|
|
|
|
id : str ............................. The required mtgo id of the card.
|
2018-02-21 19:42:58 +00:00
|
|
|
|
2018-10-22 14:19:38 +00:00
|
|
|
Optional arguments:
|
|
|
|
All arguments are inherited from CardsObject
|
2018-02-21 19:42:58 +00:00
|
|
|
|
2018-10-22 14:19:38 +00:00
|
|
|
Attributes:
|
|
|
|
All attributes are inherited from CardsObject
|
2018-02-21 19:42:58 +00:00
|
|
|
|
2018-10-22 14:19:38 +00:00
|
|
|
Example usage:
|
|
|
|
>>> card = scrython.cards.Mtgo(id="48296")
|
|
|
|
>>> card.set_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/mtgo/{}?'.format(str(kwargs.get('id')))
|
|
|
|
super(Mtgo, self).__init__(self.url)
|