Updated cards_object to pass tests

This commit is contained in:
Nanda Scott 2018-10-23 00:36:27 -04:00
parent f969562215
commit 31c562da60
1 changed files with 10 additions and 5 deletions

View File

@ -285,7 +285,7 @@ class CardsObject(object):
return self.scryfallJson['frame'] return self.scryfallJson['frame']
def full_art(self): def full_art(self):
self._checkForKey('') self._checkForKey('full_art')
return self.scryfallJson['full_art'] return self.scryfallJson['full_art']
@ -343,10 +343,10 @@ class CardsObject(object):
return self.scryfallJson['hand_modifier'] return self.scryfallJson['hand_modifier']
def color_indicator(self): def color_indicator(self, num):
self._checkForKey('color_indicator') self._checkForTupleKey('card_faces', num, 'color_indicator')
return self.scryfallJson['color_indicator'] return self.scryfallJson['card_faces'][num]['color_indicator']
def all_parts(self): def all_parts(self):
self._checkForKey('all_parts') self._checkForKey('all_parts')
@ -418,9 +418,14 @@ class CardsObject(object):
return self.scryfallJson['oracle_id'] return self.scryfallJson['oracle_id']
def nonfoil(self): def foil(self):
self._checkForKey('foil') self._checkForKey('foil')
return self.scryfallJson['foil']
def nonfoil(self):
self._checkForKey('nonfoil')
return self.scryfallJson['nonfoil'] return self.scryfallJson['nonfoil']
def oversized(self): def oversized(self):