diff --git a/Changelog.md b/Changelog.md index 86c6703..1638e65 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,22 +1,35 @@ +# Changelog + +## 1.3.4 + +Changes + +- Updates all the classes for readability and DRYness. + ## 1.3.0 New Stuff + - Scrython now uses the threading module to allow for discord.py implementations. Changes + - Added `power()`, `toughness()`, and `flavor_text()` attributes to cards_object. Thanks to Mendess2526! Bugfixes + - Fixed a bug that would prevent you from creating a cards.Autocomplete() object. ## 1.2.0 New Stuff + - Created this doc for everyone to keep track of changes to this library. - All classes now have a docstring. - Created an example script for checking cards in a .csv Changes + - cards.Autocomplete() has had the `q` parameter updated to `query`. - symbology.Parsemana() now has a required parameter of `code`. - Updated the README with more information, and better organization. diff --git a/scrython/cards/cards_object.py b/scrython/cards/cards_object.py index 9b469c0..4047a6a 100644 --- a/scrython/cards/cards_object.py +++ b/scrython/cards/cards_object.py @@ -81,7 +81,7 @@ class CardsObject(object): } self.encodedParams = urllib.parse.urlencode(self.params) - self._url = 'https://api.scryfall.com/' + _url + "&" + self.encodedParams + self._url = 'https://api.scryfall.com/{0}&{1}'.format(_url, self.encodedParams) async def getRequest(client, url, **kwargs): async with client.get(url, **kwargs) as response: diff --git a/scrython/catalog/catalogs_object.py b/scrython/catalog/catalogs_object.py index 63a6e1b..fe7bd37 100644 --- a/scrython/catalog/catalogs_object.py +++ b/scrython/catalog/catalogs_object.py @@ -24,7 +24,7 @@ class CatalogsObject(object): self.params = {'format': kwargs.get('format', 'json'), 'pretty': kwargs.get('pretty', '')} self.encodedParams = urllib.parse.urlencode(self.params) - self._url = 'https://api.scryfall.com/' + _url + "&" + self.encodedParams #Find a fix for this later + self._url = 'https://api.scryfall.com/{0}&{1}'.format(_url, self.encodedParams) async def getRequest(client, url, **kwargs): async with client.get(url, **kwargs) as response: diff --git a/scrython/rulings/rulings_object.py b/scrython/rulings/rulings_object.py index b6d36bf..e1c5272 100644 --- a/scrython/rulings/rulings_object.py +++ b/scrython/rulings/rulings_object.py @@ -38,7 +38,7 @@ class RulingsObject(object): } self.encodedParams = urllib.parse.urlencode(self.params) - self._url = 'https://api.scryfall.com/' + _url + "&" + self.encodedParams #Find a fix for this later + self._url = 'https://api.scryfall.com/{0}&{1}'.format(_url, self.encodedParams) async def getRequest(client, url, **kwargs): async with client.get(url, **kwargs) as response: diff --git a/scrython/sets/sets_object.py b/scrython/sets/sets_object.py index 987ce35..aac8cdd 100644 --- a/scrython/sets/sets_object.py +++ b/scrython/sets/sets_object.py @@ -34,7 +34,7 @@ class SetsObject(object): self.params = {'format': kwargs.get('format', 'json'), 'pretty': kwargs.get('pretty', '')} self.encodedParams = urllib.parse.urlencode(self.params) - self._url = 'https://api.scryfall.com/' + _url + "&" + self.encodedParams #Find a fix for this later + self._url = 'https://api.scryfall.com/{0}&{1}'.format(_url, self.encodedParams) async def getRequest(client, url, **kwargs): async with client.get(url, **kwargs) as response: diff --git a/scrython/symbology/symbology_object.py b/scrython/symbology/symbology_object.py index 7e6b727..c19b215 100644 --- a/scrython/symbology/symbology_object.py +++ b/scrython/symbology/symbology_object.py @@ -21,7 +21,7 @@ class SymbologyObject(object): self.params = {'format': kwargs.get('format', 'json'), 'pretty': kwargs.get('pretty', '')} self.encodedParams = urllib.parse.urlencode(self.params) - self._url = 'https://api.scryfall.com/' + _url + "&" + self.encodedParams #Find a fix for this later + self._url = 'https://api.scryfall.com/{0}&{1}'.format(_url, self.encodedParams) async def getRequest(client, url, **kwargs): async with client.get(url, **kwargs) as response: