Scrython/scrython/rulings/mtgo.py

28 lines
766 B
Python
Raw Normal View History

from .rulings_object import RulingsObject
2018-01-31 01:36:44 +00:00
class Mtgo(RulingsObject):
2018-02-21 23:33:58 +00:00
"""
cards/mtgo/:id/rulings
Gets the ruling of a card by the Mtgo Id.
Positional arguments:
id : str ................. The mtgo id of the card you want rulings for.
Optional arguments:
All arguments inherited from RulingsObject
Attributes:
All attributes inherited from RulingsObject
Example usage:
>>> rule = scrython.rulings.Mtgo(id='9611')
>>> rule.data_length()
"""
def __init__(self, **kwargs):
2018-02-13 21:55:32 +00:00
if kwargs.get('id') is None:
2018-02-14 02:02:48 +00:00
raise TypeError('No id provided to search by')
2018-02-13 21:55:32 +00:00
self.url = 'cards/mtgo/{}/rulings?'.format(str(kwargs.get('id')))
2018-01-31 01:36:44 +00:00
super(Mtgo, self).__init__(self.url)