From 215379e5fea77f5f67a3d0913fbd3fedb05bc648 Mon Sep 17 00:00:00 2001 From: Date: Tue, 27 Feb 2018 22:42:34 -0500 Subject: [PATCH] Updated docs to properly reflect changes. --- docs/Cards.md | 3 +++ scrython/cards/cards_object.py | 19 ++++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/docs/Cards.md b/docs/Cards.md index 97e4fa5..b619062 100644 --- a/docs/Cards.md +++ b/docs/Cards.md @@ -60,6 +60,9 @@ All attributes are listed assuming the following |`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_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()` Gets a card by the name. diff --git a/scrython/cards/cards_object.py b/scrython/cards/cards_object.py index f0933e7..6b86220 100644 --- a/scrython/cards/cards_object.py +++ b/scrython/cards/cards_object.py @@ -68,6 +68,9 @@ class CardsObject(object): watermark : str ......... The associated watermark of the card, 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. + 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): @@ -406,25 +409,23 @@ class CardsObject(object): def power(self): if self.__checkForKey('power') is None: raise KeyError("This card has no key \'power\'") - + return self.scryfallJson['power'] - + def toughness(self): if self.__checkForKey('toughness') is None: raise KeyError("This card has no key \'toughness\'") - + return self.scryfallJson['toughness'] - + def loyalty(self): if self.__checkForKey('loyalty') is None: raise KeyError("This card has no key \'loyalty\'") - + return self.scryfallJson['loyalty'] - + def flavor_text(self): if self.__checkForKey('flavor_text') is None: raise KeyError("This card has no key \'flavor_text\'") - + return self.scryfallJson['flavor_text'] - - \ No newline at end of file