From ddb4263380ee26a7e452767826a824c48cb68663 Mon Sep 17 00:00:00 2001 From: Nanda Scott Date: Tue, 23 Oct 2018 12:17:01 -0400 Subject: [PATCH] Updated autocomplete and search to current api standards --- scrython/cards/autocomplete.py | 8 ++++---- scrython/cards/search.py | 6 +----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/scrython/cards/autocomplete.py b/scrython/cards/autocomplete.py index c29d8f1..5375d48 100644 --- a/scrython/cards/autocomplete.py +++ b/scrython/cards/autocomplete.py @@ -14,7 +14,7 @@ class Autocomplete(CardsObject): Attributes: object : str ........ Returns what kind of object it is. - total_items : int ...... How many items are in the list. + total_values : int ...... How many items are in the list. data : list ....... The list of potential autocompletes. Example usage: @@ -40,10 +40,10 @@ class Autocomplete(CardsObject): return self.scryfallJson['object'] - def total_items(self): - super(Autocomplete, self)._checkForKey('total_items') + def total_values(self): + super(Autocomplete, self)._checkForKey('total_values') - return self.scryfallJson['total_items'] + return self.scryfallJson['total_values'] def data(self): super(Autocomplete, self)._checkForKey('data') diff --git a/scrython/cards/search.py b/scrython/cards/search.py index f0fc3af..22c82c6 100644 --- a/scrython/cards/search.py +++ b/scrython/cards/search.py @@ -43,6 +43,7 @@ class Search(CardsObject): 'unique':kwargs.get('unique', 'none'), 'dir':kwargs.get('dir', 'none'), 'include_extras':kwargs.get('include_extras', 'false'), + 'include_multilingual':kwargs.get('include_multilingual', 'false'), 'page':kwargs.get('page', '1') } @@ -71,11 +72,6 @@ class Search(CardsObject): return self.scryfallJson['next_page'] - def warnings(self): - super(Search, self)._checkForKey('warnings') - - return self.scryfallJson['warnings'] - def data_length(self): super(Search, self)._checkForKey('data')