Write docs and small fixes.

This commit is contained in:
Alex Root Junior 2018-09-07 21:24:13 +03:00
parent 23fba99d93
commit 7a55c040ee
31 changed files with 306 additions and 458 deletions

View file

@ -44,9 +44,9 @@ async def check_result(method_name: str, content_type: str, status_code: int, bo
"""
Checks whether `result` is a valid API response.
A result is considered invalid if:
- The server returned an HTTP response code other than 200
- The content of the result is invalid JSON.
- The method call was unsuccessful (The JSON 'ok' field equals False)
- The server returned an HTTP response code other than 200
- The content of the result is invalid JSON.
- The method call was unsuccessful (The JSON 'ok' field equals False)
:param method_name: The name of the method called
:param status_code: status code

View file

@ -29,6 +29,12 @@ class Bot(BaseBot):
def me(self):
"""
Reset `me`
.. code-block:: python3
await bot.me
:return: :obj:`aiogram.types.User`
"""
if hasattr(self, '_me'):
delattr(self, '_me')