How to use the scrython.cards.cards_object.CardsObject function in scrython

To help you get started, we’ve selected a few scrython examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NandaScott / Scrython / scrython / cards / arena_id.py View on Github external
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,
github NandaScott / Scrython / scrython / cards / named.py View on Github external
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.
github NandaScott / Scrython / scrython / cards / autocomplete.py View on Github external
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:
github NandaScott / Scrython / scrython / cards / randomcard.py View on Github external
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.
github NandaScott / Scrython / scrython / cards / cards_object.py View on Github external
def rarity(self):
        """The rarity of the card
        
        Returns:
            string
        """
        super(CardsObject, self)._checkForKey('rarity')

        return self.scryfallJson['rarity']
github NandaScott / Scrython / scrython / cards / collector.py View on Github external
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
github NandaScott / Scrython / scrython / cards / mtgo.py View on Github external
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,
github NandaScott / Scrython / scrython / cards / multiverse.py View on Github external
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,
github NandaScott / Scrython / scrython / cards / cardid.py View on Github external
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,