Updated docs to properly reflect changes.

This commit is contained in:
2018-02-27 22:42:34 -05:00
parent ae0789cfb7
commit 215379e5fe
2 changed files with 13 additions and 9 deletions

View File

@ -60,6 +60,9 @@ All attributes are listed assuming the following
|`card.watermark()`|String | The associated watermark of the card, if any. |`card.watermark()`|String | The associated watermark of the card, if any.
|`card.story_spotlight_number()`|Integer | This card's story spotlight number, if any. |`card.story_spotlight_number()`|Integer | This card's story spotlight number, if any.
|`card.story_spotlight_uri()`|String | The URI for the card's story article, if any. |`card.story_spotlight_uri()`|String | The URI for the card's story article, if any.
|`card.power()`|String| The power of the creature, if applicable.
|`card.toughness()`|String| The toughness of the creature, if applicable.
|`card.flavor_text()`|String| The flavor text of the card, if any.
## *class* `cards.Named()` ## *class* `cards.Named()`
Gets a card by the name. Gets a card by the name.

View File

@ -68,6 +68,9 @@ class CardsObject(object):
watermark : str ......... The associated watermark of the card, if any. watermark : str ......... The associated watermark of the card, if any.
story_spotlight_number : int ... This card's story spotlight number, if any. story_spotlight_number : int ... This card's story spotlight number, if any.
story_spotlight_uri : str ... The URI for the card's story article, if any. story_spotlight_uri : str ... The URI for the card's story article, if any.
power : str . The power of the creature, if applicable.
toughness : str . The toughness of the creature, if applicable.
flavor_text : str . The flavor text of the card, if any.
""" """
def __init__(self, _url, **kwargs): def __init__(self, _url, **kwargs):
@ -406,25 +409,23 @@ class CardsObject(object):
def power(self): def power(self):
if self.__checkForKey('power') is None: if self.__checkForKey('power') is None:
raise KeyError("This card has no key \'power\'") raise KeyError("This card has no key \'power\'")
return self.scryfallJson['power'] return self.scryfallJson['power']
def toughness(self): def toughness(self):
if self.__checkForKey('toughness') is None: if self.__checkForKey('toughness') is None:
raise KeyError("This card has no key \'toughness\'") raise KeyError("This card has no key \'toughness\'")
return self.scryfallJson['toughness'] return self.scryfallJson['toughness']
def loyalty(self): def loyalty(self):
if self.__checkForKey('loyalty') is None: if self.__checkForKey('loyalty') is None:
raise KeyError("This card has no key \'loyalty\'") raise KeyError("This card has no key \'loyalty\'")
return self.scryfallJson['loyalty'] return self.scryfallJson['loyalty']
def flavor_text(self): def flavor_text(self):
if self.__checkForKey('flavor_text') is None: if self.__checkForKey('flavor_text') is None:
raise KeyError("This card has no key \'flavor_text\'") raise KeyError("This card has no key \'flavor_text\'")
return self.scryfallJson['flavor_text'] return self.scryfallJson['flavor_text']