From 9a5a5600d8c78920020b5e64854692830bad2a98 Mon Sep 17 00:00:00 2001 From: Nanda Scott Date: Fri, 26 Oct 2018 17:24:34 -0400 Subject: [PATCH] Updated all other docstrings to let doc_gen work properly --- Autocomplete.md | 42 -------------------------- scrython/bulk_data/bulk_data.py | 17 +++++++---- scrython/cards/arena_id.py | 5 ++- scrython/cards/autocomplete.py | 5 ++- scrython/cards/cardid.py | 3 ++ scrython/cards/collector.py | 3 ++ scrython/cards/mtgo.py | 3 ++ scrython/cards/multiverse.py | 3 ++ scrython/cards/named.py | 3 ++ scrython/cards/randomcard.py | 3 ++ scrython/cards/search.py | 3 ++ scrython/catalog/artifact_types.py | 11 ++++++- scrython/catalog/artist_names.py | 11 ++++++- scrython/catalog/card_names.py | 11 ++++++- scrython/catalog/catalogs_object.py | 9 ++++++ scrython/catalog/creature_types.py | 11 ++++++- scrython/catalog/enchantment_types.py | 11 ++++++- scrython/catalog/land_types.py | 11 ++++++- scrython/catalog/loyalties.py | 11 ++++++- scrython/catalog/planeswalker_types.py | 11 ++++++- scrython/catalog/powers.py | 11 ++++++- scrython/catalog/spell_types.py | 11 ++++++- scrython/catalog/toughnesses.py | 11 ++++++- scrython/catalog/watermarks.py | 11 ++++++- scrython/catalog/word_bank.py | 11 ++++++- 25 files changed, 179 insertions(+), 63 deletions(-) delete mode 100644 Autocomplete.md diff --git a/Autocomplete.md b/Autocomplete.md deleted file mode 100644 index 34b3f35..0000000 --- a/Autocomplete.md +++ /dev/null @@ -1,42 +0,0 @@ -# **class** `Autocomplete()` -These docs will likely not be as detailed as the official Scryfall Documentation, and you should reference that for more information. - ->In the event that a key isn't found or has been changed, you can access the full JSON output with the `scryfallJson` variable (`{Class_name}().scryfallJson`). -|cards/autocomplete| -|Get a list of potential autocompletion phrases.| - -## Args - -| arg | description | -|:---:|:---:| -|q (string): -|The query of the autocompletion.| -|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.| -|pretty (string, optional): -|Defaults to empty string.| -|Returns a prettier version of the json object.| -|Note that this may break functionality with Scrython.| - -## Raises - -| arg | description | -|:---:|:---:| -|Exception: If the 'q' parameter is not provided.| -|Exception: If the object returned is an error.| - -## Example usage - -| arg | description | -|:---:|:---:| -|>>> auto = scrython.cards.Autocomplete(q="Thal")| -|>>> auto.total_items()| \ No newline at end of file diff --git a/scrython/bulk_data/bulk_data.py b/scrython/bulk_data/bulk_data.py index 5d3e20d..ec61638 100644 --- a/scrython/bulk_data/bulk_data.py +++ b/scrython/bulk_data/bulk_data.py @@ -10,14 +10,19 @@ class BulkData(FoundationObject): """ /bulk-data Queries and creates an object relating to the /bulk-data endpoint. - - Raises: - Exception: Raised if Scryfall sends an error object. - KeyError: Raised if you attempt to access a key that doesn't exist. - KeyError: Raise if you attempt to access a tuple key that doesn't exist. - + + Args: + N/A + Returns: object: The Scryfall endpoint object. + + Raises: + Exception: Raised if Scryfall sends an error object. + + Examples: + >>> data = scrython.bulk_data.BulkData() + >>> data.bulk_compressed_size() """ def __init__(self, **kwargs): diff --git a/scrython/cards/arena_id.py b/scrython/cards/arena_id.py index 3a5919a..d1530e4 100644 --- a/scrython/cards/arena_id.py +++ b/scrython/cards/arena_id.py @@ -23,11 +23,14 @@ class ArenaId(CardsObject): Returns a prettier version of the json object. Note that this may break functionality with Scrython. + Returns: + N/A + Raises: Exception: If the 'id' parameter is not provided. Exception: If the object returned is an error. - Example usage: + Examples: >>> card = scrython.cards.ArenaId(id="66975") >>> card.name() """ diff --git a/scrython/cards/autocomplete.py b/scrython/cards/autocomplete.py index 0a5bf64..f15308b 100644 --- a/scrython/cards/autocomplete.py +++ b/scrython/cards/autocomplete.py @@ -27,11 +27,14 @@ class Autocomplete(FoundationObject): Returns a prettier version of the json object. Note that this may break functionality with Scrython. + Returns: + N/A + Raises: Exception: If the 'q' parameter is not provided. Exception: If the object returned is an error. - Example usage: + Examples: >>> auto = scrython.cards.Autocomplete(q="Thal") >>> auto.total_items() """ diff --git a/scrython/cards/cardid.py b/scrython/cards/cardid.py index bd7ada9..ba4775e 100644 --- a/scrython/cards/cardid.py +++ b/scrython/cards/cardid.py @@ -23,6 +23,9 @@ class Id(CardsObject): Returns a prettier version of the json object. Note that this may break functionality with Scrython. + Returns: + N/A + Raises: Exception: If the 'id' parameter is not provided. Exception: If the object returned is an error. diff --git a/scrython/cards/collector.py b/scrython/cards/collector.py index 6d8a935..825e4bd 100644 --- a/scrython/cards/collector.py +++ b/scrython/cards/collector.py @@ -10,6 +10,9 @@ class Collector(CardsObject): collector_number (string): This is the collector number of the card lang (string, optional): Defaults to 'en'. A 2-3 character language code. + Returns: + N/A + Raises: Exception: If the 'code' parameter is not provided. Exception: If the 'collector_number' parameter is not provided. diff --git a/scrython/cards/mtgo.py b/scrython/cards/mtgo.py index 8e5c5b9..7faa3f7 100644 --- a/scrython/cards/mtgo.py +++ b/scrython/cards/mtgo.py @@ -24,6 +24,9 @@ class Mtgo(CardsObject): Returns a prettier version of the json object. Note that this may break functionality with Scrython. + Returns: + N/A + Raises: Exception: If the 'id' parameter is not provided. Exception: If the object returned is an error. diff --git a/scrython/cards/multiverse.py b/scrython/cards/multiverse.py index 27416ad..595eccb 100644 --- a/scrython/cards/multiverse.py +++ b/scrython/cards/multiverse.py @@ -23,6 +23,9 @@ class Multiverse(CardsObject): Returns a prettier version of the json object. Note that this may break functionality with Scrython. + Returns: + N/A + Raises: Exception: If the 'id' parameter is not provided. Exception: If the object returned is an error. diff --git a/scrython/cards/named.py b/scrython/cards/named.py index 14f81b3..b85e5f7 100644 --- a/scrython/cards/named.py +++ b/scrython/cards/named.py @@ -28,6 +28,9 @@ class Named(CardsObject): Returns a prettier version of the json object. Note that this may break functionality with Scrython. + Returns: + N/A + Raises: Exception: If the 'fuzzy' or 'exact' parameter is not provided. Exception: If the object returned is an error. diff --git a/scrython/cards/randomcard.py b/scrython/cards/randomcard.py index 763acad..fa9c1d1 100644 --- a/scrython/cards/randomcard.py +++ b/scrython/cards/randomcard.py @@ -23,6 +23,9 @@ class Random(CardsObject): Returns a prettier version of the json object. Note that this may break functionality with Scrython. + Returns: + N/A + Raises: Exception: If the object returned is an error. diff --git a/scrython/cards/search.py b/scrython/cards/search.py index 2007c4a..8e19d1e 100644 --- a/scrython/cards/search.py +++ b/scrython/cards/search.py @@ -46,6 +46,9 @@ class Search(FoundationObject): Returns a prettier version of the json object. Note that this may break functionality with Scrython. + Returns: + N/A + Raises: Exception: If the 'q' parameter is not provided. Exception: If the object returned is an error. diff --git a/scrython/catalog/artifact_types.py b/scrython/catalog/artifact_types.py index 16435b8..9d01c3a 100644 --- a/scrython/catalog/artifact_types.py +++ b/scrython/catalog/artifact_types.py @@ -6,7 +6,16 @@ class ArtifactTypes(CatalogsObject): Catalog object for all known artifact types - Example usage: + Args: + N/A + + Returns: + N/A + + Raises: + N/A + + Examples: >>> catalog = scrython.catalog.ArtifactTypes() >>> catalog.data() """ diff --git a/scrython/catalog/artist_names.py b/scrython/catalog/artist_names.py index d60a391..761256a 100644 --- a/scrython/catalog/artist_names.py +++ b/scrython/catalog/artist_names.py @@ -6,7 +6,16 @@ class ArtistNames(CatalogsObject): Catalog object for all known card names. - Example usage: + Args: + N/A + + Returns: + N/A + + Raises: + N/A + + Examples: >>> catalog = scrython.catalog.CardNames() >>> catalog.data() """ diff --git a/scrython/catalog/card_names.py b/scrython/catalog/card_names.py index 60c521c..421a372 100644 --- a/scrython/catalog/card_names.py +++ b/scrython/catalog/card_names.py @@ -6,7 +6,16 @@ class CardNames(CatalogsObject): Catalog object for all known card names. - Example usage: + Args: + N/A + + Returns: + N/A + + Raises: + N/A + + Examples: >>> catalog = scrython.catalog.CardNames() >>> catalog.data() """ diff --git a/scrython/catalog/catalogs_object.py b/scrython/catalog/catalogs_object.py index 3c52d4b..393ed32 100644 --- a/scrython/catalog/catalogs_object.py +++ b/scrython/catalog/catalogs_object.py @@ -14,6 +14,15 @@ class CatalogsObject(FoundationObject): Defaults to empty string. Returns a prettier version of the json object. Note that this may break functionality with Scrython. + + Returns: + N/A + + Raises: + N/A + + Examples: + N/A """ def object(self): diff --git a/scrython/catalog/creature_types.py b/scrython/catalog/creature_types.py index 1b54020..7c114f8 100644 --- a/scrython/catalog/creature_types.py +++ b/scrython/catalog/creature_types.py @@ -6,7 +6,16 @@ class CreatureTypes(CatalogsObject): Catalog object for all known creature types. - Example usage: + Args: + N/A + + Returns: + N/A + + Raises: + N/A + + Examples: >>> catalog = scrython.catalog.CreatureTypes() >>> catalog.data() """ diff --git a/scrython/catalog/enchantment_types.py b/scrython/catalog/enchantment_types.py index b20aca6..990decc 100644 --- a/scrython/catalog/enchantment_types.py +++ b/scrython/catalog/enchantment_types.py @@ -6,7 +6,16 @@ class EnchantmentTypes(CatalogsObject): Catalog object for all known enchantment types. - Example usage: + Args: + N/A + + Returns: + N/A + + Raises: + N/A + + Examples: >>> catalog = scrython.catalog.EnchantmentTypes() >>> catalog.data() """ diff --git a/scrython/catalog/land_types.py b/scrython/catalog/land_types.py index ade9b54..dc12e5b 100644 --- a/scrython/catalog/land_types.py +++ b/scrython/catalog/land_types.py @@ -6,7 +6,16 @@ class LandTypes(CatalogsObject): Catalog object for all known land types. - Example usage: + Args: + N/A + + Returns: + N/A + + Raises: + N/A + + Examples: >>> catalog = scrython.catalog.LandTypes() >>> catalog.data() """ diff --git a/scrython/catalog/loyalties.py b/scrython/catalog/loyalties.py index a8b0aab..df2ff11 100644 --- a/scrython/catalog/loyalties.py +++ b/scrython/catalog/loyalties.py @@ -6,7 +6,16 @@ class Loyalties(CatalogsObject): Catalog object for all known starting loyalties. - Example usage: + Args: + N/A + + Returns: + N/A + + Raises: + N/A + + Examples: >>> catalog = scrython.catalog.Loyalties() >>> catalog.data() """ diff --git a/scrython/catalog/planeswalker_types.py b/scrython/catalog/planeswalker_types.py index a275dd5..63fee61 100644 --- a/scrython/catalog/planeswalker_types.py +++ b/scrython/catalog/planeswalker_types.py @@ -6,7 +6,16 @@ class PlaneswalkerTypes(CatalogsObject): Catalog object for all known planeswalker types. - Example usage: + Args: + N/A + + Returns: + N/A + + Raises: + N/A + + Examples: >>> catalog = scrython.catalog.PlaneswalkerTypes() >>> catalog.data() """ diff --git a/scrython/catalog/powers.py b/scrython/catalog/powers.py index d64fe96..6bc64a8 100644 --- a/scrython/catalog/powers.py +++ b/scrython/catalog/powers.py @@ -6,7 +6,16 @@ class Powers(CatalogsObject): Catalog object for all known powers. - Example usage: + Args: + N/A + + Returns: + N/A + + Raises: + N/A + + Examples: >>> catalog = scrython.catalog.Powers() >>> catalog.data() """ diff --git a/scrython/catalog/spell_types.py b/scrython/catalog/spell_types.py index b3682c8..58a3b40 100644 --- a/scrython/catalog/spell_types.py +++ b/scrython/catalog/spell_types.py @@ -6,7 +6,16 @@ class SpellTypes(CatalogsObject): Catalog object for all known spell types. - Example usage: + Args: + N/A + + Returns: + N/A + + Raises: + N/A + + Examples: >>> catalog = scrython.catalog.SpellTypes() >>> catalog.data() """ diff --git a/scrython/catalog/toughnesses.py b/scrython/catalog/toughnesses.py index 7efa724..aac386f 100644 --- a/scrython/catalog/toughnesses.py +++ b/scrython/catalog/toughnesses.py @@ -6,7 +6,16 @@ class Toughnesses(CatalogsObject): Catalog object for all known toughnesses. - Example usage: + Args: + N/A + + Returns: + N/A + + Raises: + N/A + + Examples: >>> catalog = scrython.catalog.Toughnesses() >>> catalog.data() """ diff --git a/scrython/catalog/watermarks.py b/scrython/catalog/watermarks.py index 300621c..5dee063 100644 --- a/scrython/catalog/watermarks.py +++ b/scrython/catalog/watermarks.py @@ -6,7 +6,16 @@ class Watermarks(CatalogsObject): Catalog object for all known watermarks. - Example usage: + Args: + N/A + + Returns: + N/A + + Raises: + N/A + + Examples: >>> catalog = scrython.catalog.Watermarks() >>> catalog.data() """ diff --git a/scrython/catalog/word_bank.py b/scrython/catalog/word_bank.py index d81aca4..c40db07 100644 --- a/scrython/catalog/word_bank.py +++ b/scrython/catalog/word_bank.py @@ -6,7 +6,16 @@ class WordBank(CatalogsObject): Catalog object for all known words on all cards. - Example usage: + Args: + N/A + + Returns: + N/A + + Raises: + N/A + + Examples: >>> catalog = scrython.catalog.WordBank() >>> catalog.data() """