Added deprecation warnings to foil and nonfoil

This commit is contained in:
NandaScott 2021-09-06 12:20:57 -04:00
parent fbd8aeb55f
commit daee40ba20
1 changed files with 9 additions and 1 deletions

View File

@ -673,23 +673,31 @@ class CardsObject(FoundationObject):
return self.scryfallJson['oracle_id']
def foil(self):
"""True if this printing exists in a foil version
"""True if this printing exists in a foil version.
DEPRECATION NOTICE: This method will be deprecated on Nov 1, 2021.
Returns:
boolean
"""
super(CardsObject, self)._checkForKey('foil')
print('WARNING: This method will be deprecated on Nov 1, 2021. Please use the `finishes` method instead.')
return self.scryfallJson['foil']
def nonfoil(self):
"""True if this printing does not exist in foil
DEPRECATION NOTICE: This method will be deprecated on Nov 1, 2021.
Returns:
boolean
"""
super(CardsObject, self)._checkForKey('nonfoil')
print('WARNING: This method will be deprecated on Nov 1, 2021. Please use the `finishes` method instead.')
return self.scryfallJson['nonfoil']
def oversized(self):