Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
from .cards_object import CardsObject
class ArenaId(CardsObject):
"""
cards/id
Get a card by the Arena id.
Args:
id (string):
The Arena Id of the card.
format (string, optional):
Defaults to 'json'.
Returns data in the specified method.
face (string, optional):
Defaults to empty string.
If you're using the `image` format, this will specify if you want the front or back face.
version (string, optional):
Defaults to empty string.
If you're using the `image` format, this will specify if you want the small, normal,
from .cards_object import CardsObject
import urllib.parse
class Named(CardsObject):
"""
cards/named
Gets a card by the name.
Args:
fuzzy (string): Uses the fuzzy parameter for the card name.
exact (string): Uses the exact parameter for the card name.
set (string, optional):
Defaults to empty string.
Returns the set of the card if specified.
Requires the 3 letter set code.
format (string, optional):
Defaults to 'json'.
Returns data in the specified method.
face (string, optional):
Defaults to empty string.
from .cards_object import CardsObject
import urllib.parse
class Autocomplete(CardsObject):
"""
cards/autocomplete
Get a list of potential autocompletion phrases.
Positional arguments:
q : str ........... The query of the autocompletion.
Optional arguments:
Inherits arguments from CardsObject.
Attributes:
object : str ........ Returns what kind of object it is.
total_items : int ...... How many items are in the list.
data : list ....... The list of potential autocompletes.
Example usage:
from .cards_object import CardsObject
class Random(CardsObject):
"""
cards/random
Get a random card.
Args:
format (string, optional):
Defaults to 'json'.
Returns data in the specified method.
face (string, optional):
Defaults to empty string.
If you're using the `image` format,
this will specify if you want the front or back face.
version (string, optional):
Defaults to empty string.
If you're using the `image` format, this will specify
if you want the small, normal, large, etc version of the image.
def rarity(self):
"""The rarity of the card
Returns:
string
"""
super(CardsObject, self)._checkForKey('rarity')
return self.scryfallJson['rarity']
from .cards_object import CardsObject
class Collector(CardsObject):
"""
cards/collector
Get a card by collector number.
Positional arguments:
code : str ....................... This is the 3 letter code for the set
collector_number : str ........ This is the collector number of the card
Optional arguments:
Inherits all arguments from CardsObject
lang : str ............................... A 2-3 character language code
Attributes:
Inherits all attributes from CardsObject
from .cards_object import CardsObject
import urllib.parse
class Mtgo(CardsObject):
"""
cards/mtgo
Get a card by MTGO id.
Args:
id (string):
The MTGO Id of the card.
format (string, optional):
Defaults to 'json'.
Returns data in the specified method.
face (string, optional):
Defaults to empty string.
If you're using the `image` format, this will specify if you want the front or back face.
version (string, optional):
Defaults to empty string.
If you're using the `image` format, this will specify if you want the small, normal,
from .cards_object import CardsObject
class Multiverse(CardsObject):
"""
cards/multiverse
Get a card by Multiverse id
Args:
id (string):
The Multiverse Id of the card.
format (string, optional):
Defaults to 'json'.
Returns data in the specified method.
face (string, optional):
Defaults to empty string.
If you're using the `image` format, this will specify if you want the front or back face.
version (string, optional):
Defaults to empty string.
If you're using the `image` format, this will specify if you want the small, normal,
from .cards_object import CardsObject
class Id(CardsObject):
"""
cards/id
Get a card by the Scryfall id.
Args:
id (string):
The Scryfall Id of the card.
format (string, optional):
Defaults to 'json'.
Returns data in the specified method.
face (string, optional):
Defaults to empty string.
If you're using the `image` format, this will specify if you want the front or back face.
version (string, optional):
Defaults to empty string.
If you're using the `image` format, this will specify if you want the small, normal,