From 43216473407f43f3d3cb4ff1c251036244c8c1aa Mon Sep 17 00:00:00 2001 From: Nanda Scott Date: Tue, 20 Feb 2018 12:42:26 -0500 Subject: [PATCH] Updated cards documentation and Readme. --- README.md | 4 ++++ docs/Cards.md | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/README.md b/README.md index b46d566..0ee2a41 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # Scrython + Scrython is a wrapper for the Scryfall API, designed for an easier use. Make sure to familiarize yourself with the docs. + +[Here is a link to the Scryfall API documentation.](https://scryfall.com/docs/api) + ## Breaking changes Since Scryfall's API is constantly changing, this library will also be changing. diff --git a/docs/Cards.md b/docs/Cards.md index 7078caa..5965fc0 100644 --- a/docs/Cards.md +++ b/docs/Cards.md @@ -133,3 +133,27 @@ Get a list of potential autocompletion phrases. |`object()`|String|Returns what kind of object it is.| |`total_items()`|Integer|How many items are in the list.| |`data()`|List|The list of potential autocompletes.| + +## *class* `cards.Search()` +Uses a search query to gather relevant data. + +**Parameters:** + +| Param |Required [y/n]| Input type | Function | +|:---:|:---:|:---:|:---:| +|`q`|Yes|String| The query to search. This will be updated in the future.| +|`order`|No|String| The order you'd like the data returned.| +|`unique`|No|String|A way to filter similar cards.| +|`dir`|No|String|The direction you'd like to sort. (`asc`, `desc`, `auto`)| +|`include_extras`|No|Boolean|Includes cards that are normally omitted from search results, like Un-sets.| +|`page`|No|Integer|The page number you'd like to search, if any.| + +**Attributes:** + +|Name|Output Type|Description| +|:--:|:--:|:--:| +|`object()`|String|Returns what kind of object it is.| +|`total_cards()`|Integer|How many cards are returned from the query.| +|`data()`|List|The list of potential autocompletes.| +|`has_more()`|Boolean|True if there is more than 1 page of results.| +|`next_page()`|String|The API URI to the next page of the query.|