From 2286ace24c6cb20b483a866b5cebead5d20e72f8 Mon Sep 17 00:00:00 2001 From: Nanda Scott Date: Tue, 23 Oct 2018 23:06:01 -0400 Subject: [PATCH] Figured out a syntax that will deprecate many methods --- scrython/rulings/rulings_object.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scrython/rulings/rulings_object.py b/scrython/rulings/rulings_object.py index 9d45ec9..ef587c3 100644 --- a/scrython/rulings/rulings_object.py +++ b/scrython/rulings/rulings_object.py @@ -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):