Figured out a syntax that will deprecate many methods
This commit is contained in:
parent
bf8e97caf7
commit
2286ace24c
|
@ -53,9 +53,16 @@ class RulingsObject(FoundationObject):
|
|||
|
||||
return self.scryfallJson['has_more']
|
||||
|
||||
def data(self):
|
||||
def data(self, index=None, key=None):
|
||||
self._checkForKey('data')
|
||||
|
||||
if index is not None:
|
||||
if key is not None:
|
||||
self._checkForTupleKey('data', index, key)
|
||||
return self.scryfallJson['data'][index][key]
|
||||
|
||||
return self.scryfallJson['data'][index]
|
||||
|
||||
return self.scryfallJson['data']
|
||||
|
||||
def data_length(self):
|
||||
|
|
Loading…
Reference in New Issue