Fixing merge conflicts
This commit is contained in:
commit
ae28e11e6a
|
@ -26,7 +26,7 @@ N/A
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
```python
|
```python
|
||||||
>>> card = scrython.cards.Id(id="5386a61c
|
>>> card = scrython.cards.Id(id="5386a61c-4928-4bd1-babe-5b089ab8b2d9")
|
||||||
>>> card.name()
|
>>> card.name()
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,11 @@ These docs will likely not be as detailed as the official Scryfall Documentation
|
||||||
|
|
||||||
|arg|type|description|
|
|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.|
|
|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.|
|
|pretty|string, optional|Returns a prettier version of the json object. Note that this may break functionality with Scrython.|
|
||||||
|
|
||||||
## Returns
|
## Returns
|
||||||
|
@ -20,100 +23,52 @@ N/A
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
```python
|
```python
|
||||||
>>> set = scrython.sets.Code(code="por")
|
>>> rule = scrython.rulings.Code(code="ddg", collector_number="42")
|
||||||
>>> set.name()
|
>>> rule.data_length()
|
||||||
```
|
```
|
||||||
|
|
||||||
## Methods
|
## 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:
|
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:
|
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:
|
Returns:
|
||||||
integer
|
boolean: True if there are more results
|
||||||
|
|
||||||
```
|
|
||||||
---
|
|
||||||
### `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
|
|
||||||
|
|
||||||
```
|
```
|
||||||
---
|
---
|
||||||
|
@ -127,43 +82,3 @@ Returns the type of object it is
|
||||||
string
|
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
|
|
||||||
|
|
||||||
```
|
|
|
@ -22,7 +22,7 @@ N/A
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
```python
|
```python
|
||||||
>>> rule = scrython.rulings.Id(id="5976c352
|
>>> rule = scrython.rulings.Id(id="5976c352-ac49-4e0d-a4c0-ec9b6b78db9c")
|
||||||
>>> rule.data_length()
|
>>> rule.data_length()
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
29
gen_docs.py
29
gen_docs.py
|
@ -1,12 +1,7 @@
|
||||||
import sys
|
import sys
|
||||||
import scrython
|
import scrython
|
||||||
import re
|
import re
|
||||||
from scrython.bulk_data import *
|
import os
|
||||||
from scrython.cards import *
|
|
||||||
from scrython.catalog import *
|
|
||||||
from scrython.rulings import *
|
|
||||||
from scrython.sets import *
|
|
||||||
from scrython.symbology import *
|
|
||||||
|
|
||||||
def format_args(string, f):
|
def format_args(string, f):
|
||||||
f.write('\n## Args\n\n|arg|type|description|\n|:---:|:---:|:---:|\n')
|
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):
|
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('\n## Examples\n')
|
||||||
f.write('```python\n{}\n```\n'.format('\n'.join(example_list)))
|
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('_')]
|
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:
|
with open('./docs/{}/{}.md'.format(subpackage.__name__, _class), 'w') as f:
|
||||||
f.write('# **class** `{}.{}()`\n'.format(subpackage.__name__, _class))
|
f.write('# **class** `{}.{}()`\n'.format(subpackage.__name__, _class))
|
||||||
f.write(intro)
|
f.write(intro)
|
||||||
|
@ -108,9 +106,26 @@ These docs will likely not be as detailed as the official Scryfall Documentation
|
||||||
print('~~~~~~~~~~~~~~~~~~~~~~~~~~')
|
print('~~~~~~~~~~~~~~~~~~~~~~~~~~')
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
from scrython.bulk_data import *
|
||||||
main(scrython.bulk_data)
|
main(scrython.bulk_data)
|
||||||
|
del scrython.bulk_data
|
||||||
|
|
||||||
|
from scrython.cards import *
|
||||||
main(scrython.cards)
|
main(scrython.cards)
|
||||||
|
del scrython.cards
|
||||||
|
|
||||||
|
from scrython.catalog import *
|
||||||
main(scrython.catalog)
|
main(scrython.catalog)
|
||||||
|
del scrython.catalog
|
||||||
|
|
||||||
|
from scrython.rulings import *
|
||||||
main(scrython.rulings)
|
main(scrython.rulings)
|
||||||
|
del scrython.rulings
|
||||||
|
|
||||||
|
from scrython.sets import *
|
||||||
main(scrython.sets)
|
main(scrython.sets)
|
||||||
|
del scrython.sets
|
||||||
|
|
||||||
|
from scrython.symbology import *
|
||||||
main(scrython.symbology)
|
main(scrython.symbology)
|
||||||
|
del scrython.symbology
|
Loading…
Reference in New Issue