Scrython/scrython/cards/named.py

19 lines
462 B
Python
Raw Normal View History

from .cards_object import CardsObject
import urllib.parse
2018-01-10 01:59:55 +00:00
class Named(CardsObject):
def __init__(self, **kwargs):
2018-02-13 21:51:03 +00:00
self.dict = {
2018-02-14 02:02:48 +00:00
'set':kwargs.get('set', '')
2018-02-13 21:51:03 +00:00
}
2018-01-10 01:59:55 +00:00
2018-02-14 02:02:48 +00:00
if kwargs.get('exact') is not None:
self.dict['exact'] = kwargs.get('exact')
if kwargs.get('fuzzy') is not None:
self.dict['fuzzy'] = kwargs.get('fuzzy')
self.args = urllib.parse.urlencode(self.dict)
self.url = 'cards/named?' + self.args
super(Named, self).__init__(self.url)