Skip to content

Commit

Permalink
v0.6.0
Browse files Browse the repository at this point in the history
Update documentation
  • Loading branch information
Kronopt committed May 3, 2019
1 parent 41454a2 commit f1c0680
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 15 deletions.
5 changes: 5 additions & 0 deletions docs/history.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# History
### 0.6.0 (2019-05-3)
* V2Client get methods now return element instead of single element list
* set urllib3 version to >=1.24.3, <1.25 (CVE-2019-11236)
* Support for Python 3.4 and 3.5

### 0.5.2 (2019-03-01)
* Fixed bug that caused pokemon_encounters subresource to not be detected in LocationAreaResource
(thanks to [jachymb](https://github.com/jachymb))
Expand Down
28 changes: 14 additions & 14 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,24 +75,24 @@ Then you can start grabbing stuff from the API:
```python
>>> mew = pokepy.V2Client().get_pokemon('mew')
>>> mew
[<Pokemon - Mew>]
>>> mew[0].name
<Pokemon - Mew>
>>> mew.name
mew
```

```python
>>> kakuna = pokepy.V2Client().get_pokemon(14)
>>> kakuna
[<Pokemon - Kakuna>]
>>> kakuna[0].weigth
<Pokemon - Kakuna>
>>> kakuna.weigth
100
```

```python
>>> cut = pokepy.V2Client().get_move(15)
>>> cut
[<Move - Cut>]
>>> cut[0].power
<Move - Cut>
>>> cut.power
50
```

Expand All @@ -101,30 +101,30 @@ Some resources have subresources:
```python
>>> kakuna = pokepy.V2Client().get_pokemon(14)
>>> kakuna
[<Pokemon - Kakuna>]
>>> kakuna[0].types
<Pokemon - Kakuna>
>>> kakuna.types
[<Pokemon_Type>, <Pokemon_Type>]
>>> kakuna[0].types[0].type.name
>>> kakuna.types[0].type.name
poison
```

```python
>>> insomnia = pokepy.V2Client().get_ability(15)
>>> insomnia
[<Ability - Insomnia>]
>>> insomnia[0].effect_entries[0].short_effect
<Ability - Insomnia>
>>> insomnia.effect_entries[0].short_effect
Prevents sleep.
```

### Parameters
Most resources can be requested by using either the `name` or `id` of the resource:
```python
>>> pokepy.V2Client().get_pokemon('rotom')
[<Pokemon - Rotom>]
<Pokemon - Rotom>
>>> pokepy.V2Client().get_pokemon(479)
[<Pokemon - Rotom>]
<Pokemon - Rotom>
>>> pokepy.V2Client().get_pokemon('479')
[<Pokemon - Rotom>]
<Pokemon - Rotom>
```

### Cache
Expand Down
2 changes: 1 addition & 1 deletion pokepy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
__author__ = 'Paul Hallett'
__email__ = '[email protected]'
__credits__ = ["Paul Hallett", "Owen Hallett", "Kronopt"]
__version__ = '0.5.2'
__version__ = '0.6.0'
__copyright__ = 'Copyright Paul Hallett 2016'
__license__ = 'BSD'

Expand Down

0 comments on commit f1c0680

Please sign in to comment.