Updated all self._url variables to use format.
This commit is contained in:
parent
5460d2b676
commit
7ad802bcd8
13
Changelog.md
13
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.
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue