diff --git a/docs/history.md b/docs/history.md index a666efa..17ca4ae 100644 --- a/docs/history.md +++ b/docs/history.md @@ -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)) diff --git a/docs/usage.md b/docs/usage.md index 50d1ae8..0c3c1f8 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -75,24 +75,24 @@ Then you can start grabbing stuff from the API: ```python >>> mew = pokepy.V2Client().get_pokemon('mew') >>> mew -[] ->>> mew[0].name + +>>> mew.name mew ``` ```python >>> kakuna = pokepy.V2Client().get_pokemon(14) >>> kakuna -[] ->>> kakuna[0].weigth + +>>> kakuna.weigth 100 ``` ```python >>> cut = pokepy.V2Client().get_move(15) >>> cut -[] ->>> cut[0].power + +>>> cut.power 50 ``` @@ -101,18 +101,18 @@ Some resources have subresources: ```python >>> kakuna = pokepy.V2Client().get_pokemon(14) >>> kakuna -[] ->>> kakuna[0].types + +>>> kakuna.types [, ] ->>> kakuna[0].types[0].type.name +>>> kakuna.types[0].type.name poison ``` ```python >>> insomnia = pokepy.V2Client().get_ability(15) >>> insomnia -[] ->>> insomnia[0].effect_entries[0].short_effect + +>>> insomnia.effect_entries[0].short_effect Prevents sleep. ``` @@ -120,11 +120,11 @@ Prevents sleep. Most resources can be requested by using either the `name` or `id` of the resource: ```python >>> pokepy.V2Client().get_pokemon('rotom') -[] + >>> pokepy.V2Client().get_pokemon(479) -[] + >>> pokepy.V2Client().get_pokemon('479') -[] + ``` ### Cache diff --git a/pokepy/__init__.py b/pokepy/__init__.py index 1de8a25..55aee26 100644 --- a/pokepy/__init__.py +++ b/pokepy/__init__.py @@ -16,7 +16,7 @@ __author__ = 'Paul Hallett' __email__ = 'hello@phalt.co' __credits__ = ["Paul Hallett", "Owen Hallett", "Kronopt"] -__version__ = '0.5.2' +__version__ = '0.6.0' __copyright__ = 'Copyright Paul Hallett 2016' __license__ = 'BSD'