Fixing merge conflicts

This commit is contained in:
Nanda Scott 2019-02-02 19:25:26 -05:00
commit ae28e11e6a
4 changed files with 52 additions and 122 deletions

View File

@ -26,7 +26,7 @@ N/A
## Examples
```python
>>> card = scrython.cards.Id(id="5386a61c
>>> card = scrython.cards.Id(id="5386a61c-4928-4bd1-babe-5b089ab8b2d9")
>>> card.name()
```

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
```
---
@ -126,44 +81,4 @@ Returns the type of object it is
Returns:
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()
```

View File

@ -1,12 +1,7 @@
import sys
import scrython
import re
from scrython.bulk_data import *
from scrython.cards import *
from scrython.catalog import *
from scrython.rulings import *
from scrython.sets import *
from scrython.symbology import *
import os
def format_args(string, f):
f.write('\n## Args\n\n|arg|type|description|\n|:---:|:---:|:---:|\n')
@ -48,7 +43,7 @@ def format_raises(string, f):
def format_examples(string, f):
example_list = re.findall(r'>{3}[\s\w=.("+:,)]+', string)
example_list = re.findall(r'>{3}[\s\w=.("+:,\-)]+', string)
f.write('\n## Examples\n')
f.write('```python\n{}\n```\n'.format('\n'.join(example_list)))
@ -88,6 +83,9 @@ These docs will likely not be as detailed as the official Scryfall Documentation
functions = [x for x in dir(eval(_class)) if not x.startswith('_')]
if not os.path.exists('./docs/{}'.format(subpackage.__name__)):
os.makedirs('./docs/{}'.format(subpackage.__name__))
with open('./docs/{}/{}.md'.format(subpackage.__name__, _class), 'w') as f:
f.write('# **class** `{}.{}()`\n'.format(subpackage.__name__, _class))
f.write(intro)
@ -108,9 +106,26 @@ These docs will likely not be as detailed as the official Scryfall Documentation
print('~~~~~~~~~~~~~~~~~~~~~~~~~~')
if __name__ == '__main__':
from scrython.bulk_data import *
main(scrython.bulk_data)
del scrython.bulk_data
from scrython.cards import *
main(scrython.cards)
del scrython.cards
from scrython.catalog import *
main(scrython.catalog)
del scrython.catalog
from scrython.rulings import *
main(scrython.rulings)
del scrython.rulings
from scrython.sets import *
main(scrython.sets)
main(scrython.symbology)
del scrython.sets
from scrython.symbology import *
main(scrython.symbology)
del scrython.symbology