Updated docstrings of all cards modules.
This commit is contained in:
parent
7e35da05c2
commit
83df7a5387
|
@ -2,7 +2,7 @@ import asyncio, aiohttp
|
||||||
import json
|
import json
|
||||||
|
|
||||||
class Collector(object):
|
class Collector(object):
|
||||||
""" cards/named
|
""" cards/:code/:collector_number
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
code: int The 3 or 4 letter set code.
|
code: int The 3 or 4 letter set code.
|
||||||
|
@ -82,7 +82,7 @@ class Collector(object):
|
||||||
'version':self.version,
|
'version':self.version,
|
||||||
'pretty':self.pretty
|
'pretty':self.pretty
|
||||||
}))
|
}))
|
||||||
|
|
||||||
if self.scryfallJson['object'] == 'error':
|
if self.scryfallJson['object'] == 'error':
|
||||||
raise Exception(self.scryfallJson['details'])
|
raise Exception(self.scryfallJson['details'])
|
||||||
self.session.close()
|
self.session.close()
|
||||||
|
|
|
@ -2,7 +2,7 @@ import asyncio, aiohttp
|
||||||
import json
|
import json
|
||||||
|
|
||||||
class Id(object):
|
class Id(object):
|
||||||
""" cards/named
|
""" cards/:id
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
id: str The Scryfall id of the card.
|
id: str The Scryfall id of the card.
|
||||||
|
|
|
@ -2,10 +2,10 @@ import asyncio, aiohttp
|
||||||
import json
|
import json
|
||||||
|
|
||||||
class Mtgo(object):
|
class Mtgo(object):
|
||||||
""" cards/named
|
""" cards/mtgo/:id
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
id: int The multiverse id of the card.
|
id: int The mtgo id of the card.
|
||||||
format: str The data format to return: json, text, or image. Defaults to json.
|
format: str The data format to return: json, text, or image. Defaults to json.
|
||||||
face: str If using the image format and this parameter has the value back,
|
face: str If using the image format and this parameter has the value back,
|
||||||
the back face of the card will be returned.
|
the back face of the card will be returned.
|
||||||
|
|
|
@ -2,7 +2,7 @@ import asyncio, aiohttp
|
||||||
import json
|
import json
|
||||||
|
|
||||||
class RandomCard(object):
|
class RandomCard(object):
|
||||||
""" cards/named
|
""" cards/random
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
format: str The data format to return: json, text, or image. Defaults to json.
|
format: str The data format to return: json, text, or image. Defaults to json.
|
||||||
|
@ -78,7 +78,7 @@ class RandomCard(object):
|
||||||
'version':self.version,
|
'version':self.version,
|
||||||
'pretty':self.pretty
|
'pretty':self.pretty
|
||||||
}))
|
}))
|
||||||
|
|
||||||
if self.scryfallJson['object'] == 'error':
|
if self.scryfallJson['object'] == 'error':
|
||||||
raise Exception(self.scryfallJson['details'])
|
raise Exception(self.scryfallJson['details'])
|
||||||
self.session.close()
|
self.session.close()
|
||||||
|
|
Loading…
Reference in New Issue