From 31c562da60e0b12064019a1fd29f32f8b201f9a4 Mon Sep 17 00:00:00 2001 From: Nanda Scott Date: Tue, 23 Oct 2018 00:36:27 -0400 Subject: [PATCH] Updated cards_object to pass tests --- scrython/cards/cards_object.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/scrython/cards/cards_object.py b/scrython/cards/cards_object.py index 0a0c8d1..2068edb 100644 --- a/scrython/cards/cards_object.py +++ b/scrython/cards/cards_object.py @@ -285,7 +285,7 @@ class CardsObject(object): return self.scryfallJson['frame'] def full_art(self): - self._checkForKey('') + self._checkForKey('full_art') return self.scryfallJson['full_art'] @@ -343,10 +343,10 @@ class CardsObject(object): return self.scryfallJson['hand_modifier'] - def color_indicator(self): - self._checkForKey('color_indicator') + def color_indicator(self, num): + self._checkForTupleKey('card_faces', num, 'color_indicator') - return self.scryfallJson['color_indicator'] + return self.scryfallJson['card_faces'][num]['color_indicator'] def all_parts(self): self._checkForKey('all_parts') @@ -418,9 +418,14 @@ class CardsObject(object): return self.scryfallJson['oracle_id'] - def nonfoil(self): + def foil(self): self._checkForKey('foil') + return self.scryfallJson['foil'] + + def nonfoil(self): + self._checkForKey('nonfoil') + return self.scryfallJson['nonfoil'] def oversized(self):