Updated docs

This commit is contained in:
Nanda Scott 2018-10-31 13:06:10 -04:00
parent ba0c3d4128
commit 9e06be5426
2 changed files with 28 additions and 113 deletions

View File

@ -8,8 +8,11 @@ These docs will likely not be as detailed as the official Scryfall Documentation
|arg|type|description|
|:---:|:---:|:---:|
|code|string|The 3 letter code of the set.|
|set|string|The 3 letter set code of the card you want rulings for.|
|collector_number|string|The collector number of the card.|
|format|string, optional|Returns data in the specified method. Defaults to JSON.|
|face|string, optional|If you\'re using the `image` format, this will specify if you want the front or back face.|
|version|string, optional|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|Returns a prettier version of the json object. Note that this may break functionality with Scrython.|
## Returns
@ -20,100 +23,52 @@ N/A
## Examples
```python
>>> set = scrython.sets.Code(code="por")
>>> set.name()
>>> rule = scrython.rulings.Code(code="ddg", collector_number="42")
>>> rule.data_length()
```
## Methods
---
### `block()`
### `data()`
```
The full name of the block a set was in
The data returned from the query
Acceptable keys:
object (string): The type of object for a given ruling.
source (string): The source of the ruling.
published_at (string): The date when the ruling was published.
comment (string): The effective ruling.
Args:
index (integer, optional): Defaults to None. Access a specific index.
key (string, optional): Defaults to None. Returns the value of the given key. Requires the `index` argument.
Returns:
string
List: The full list of data.
Dictionary: If given an index
String: If given an index and key.
```
---
### `block_code()`
### `data_length()`
```
The the letter code for the block the set was in
The length of the `data` list.
Returns:
string
Integer
```
---
### `card_count()`
### `has_more()`
```
The number of cards in the set
True if there is more than one page of results
Returns:
integer
```
---
### `code()`
```
The three letter set code of the set
Returns:
string
```
---
### `digital()`
```
True if this set is only featured on MTGO
Returns:
boolean
```
---
### `foil_only()`
```
True if this set only has foils
Returns:
boolean
```
---
### `icon_svg_uri()`
```
A URI to the SVG of the set symbol
Returns:
string
```
---
### `mtgo_code()`
```
The mtgo equivalent of `code()`
Returns:
string
```
---
### `name()`
```
The full name of the set
Returns:
string
boolean: True if there are more results
```
---
@ -127,43 +82,3 @@ Returns the type of object it is
string
```
---
### `parent_set_code()`
```
The set code for the parent set
Returns:
string
```
---
### `released_at()`
```
The date the set was launched
Returns:
string
```
---
### `search_uri()`
```
The scryfall API url for the search
Returns:
string
```
---
### `set_type()`
```
The type of the set (expansion, commander, etc)
Returns:
string
```

View File

@ -22,7 +22,7 @@ N/A
## Examples
```python
>>> rule = scrython.rulings.Id(id="5976c352
>>> rule = scrython.rulings.Id(id="5976c352-ac49-4e0d-a4c0-ec9b6b78db9c")
>>> rule.data_length()
```