Updated autocomplete and search to current api standards
This commit is contained in:
parent
31c562da60
commit
ddb4263380
|
@ -14,7 +14,7 @@ class Autocomplete(CardsObject):
|
||||||
|
|
||||||
Attributes:
|
Attributes:
|
||||||
object : str ........ Returns what kind of object it is.
|
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.
|
data : list ....... The list of potential autocompletes.
|
||||||
|
|
||||||
Example usage:
|
Example usage:
|
||||||
|
@ -40,10 +40,10 @@ class Autocomplete(CardsObject):
|
||||||
|
|
||||||
return self.scryfallJson['object']
|
return self.scryfallJson['object']
|
||||||
|
|
||||||
def total_items(self):
|
def total_values(self):
|
||||||
super(Autocomplete, self)._checkForKey('total_items')
|
super(Autocomplete, self)._checkForKey('total_values')
|
||||||
|
|
||||||
return self.scryfallJson['total_items']
|
return self.scryfallJson['total_values']
|
||||||
|
|
||||||
def data(self):
|
def data(self):
|
||||||
super(Autocomplete, self)._checkForKey('data')
|
super(Autocomplete, self)._checkForKey('data')
|
||||||
|
|
|
@ -43,6 +43,7 @@ class Search(CardsObject):
|
||||||
'unique':kwargs.get('unique', 'none'),
|
'unique':kwargs.get('unique', 'none'),
|
||||||
'dir':kwargs.get('dir', 'none'),
|
'dir':kwargs.get('dir', 'none'),
|
||||||
'include_extras':kwargs.get('include_extras', 'false'),
|
'include_extras':kwargs.get('include_extras', 'false'),
|
||||||
|
'include_multilingual':kwargs.get('include_multilingual', 'false'),
|
||||||
'page':kwargs.get('page', '1')
|
'page':kwargs.get('page', '1')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,11 +72,6 @@ class Search(CardsObject):
|
||||||
|
|
||||||
return self.scryfallJson['next_page']
|
return self.scryfallJson['next_page']
|
||||||
|
|
||||||
def warnings(self):
|
|
||||||
super(Search, self)._checkForKey('warnings')
|
|
||||||
|
|
||||||
return self.scryfallJson['warnings']
|
|
||||||
|
|
||||||
def data_length(self):
|
def data_length(self):
|
||||||
super(Search, self)._checkForKey('data')
|
super(Search, self)._checkForKey('data')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue