mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 09:26:37 +03:00
Update install/test server docs and add new known RPC error
This commit is contained in:
parent
5f16434346
commit
319b6283a9
|
@ -6,14 +6,16 @@ Installation
|
||||||
|
|
||||||
Telethon is a Python library, which means you need to download and install
|
Telethon is a Python library, which means you need to download and install
|
||||||
Python from https://www.python.org/downloads/ if you haven't already. Once
|
Python from https://www.python.org/downloads/ if you haven't already. Once
|
||||||
you have Python installed, run:
|
you have Python installed, `upgrade pip`__ and run:
|
||||||
|
|
||||||
.. code-block:: sh
|
.. code-block:: sh
|
||||||
|
|
||||||
pip3 install -U telethon --user
|
python3 -m pip install --upgrade pip
|
||||||
|
python3 -m pip install --upgrade telethon
|
||||||
|
|
||||||
To install or upgrade the library to the latest version.
|
…to install or upgrade the library to the latest version.
|
||||||
|
|
||||||
|
.. __: https://pythonspeed.com/articles/upgrade-pip/
|
||||||
|
|
||||||
Installing Development Versions
|
Installing Development Versions
|
||||||
===============================
|
===============================
|
||||||
|
@ -23,7 +25,7 @@ you can run the following command instead:
|
||||||
|
|
||||||
.. code-block:: sh
|
.. code-block:: sh
|
||||||
|
|
||||||
pip3 install -U https://github.com/LonamiWebs/Telethon/archive/master.zip --user
|
python3 -m pip install --upgrade https://github.com/LonamiWebs/Telethon/archive/master.zip
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
|
@ -74,7 +76,7 @@ manually.
|
||||||
|
|
||||||
Some of the modules may require additional dependencies before being
|
Some of the modules may require additional dependencies before being
|
||||||
installed through ``pip``. If you have an ``apt``-based system, consider
|
installed through ``pip``. If you have an ``apt``-based system, consider
|
||||||
installing the most commonly missing dependencies:
|
installing the most commonly missing dependencies (with the right ``pip``):
|
||||||
|
|
||||||
.. code-block:: sh
|
.. code-block:: sh
|
||||||
|
|
||||||
|
@ -85,6 +87,7 @@ manually.
|
||||||
|
|
||||||
Thanks to `@bb010g`_ for writing down this nice list.
|
Thanks to `@bb010g`_ for writing down this nice list.
|
||||||
|
|
||||||
|
|
||||||
.. _cryptg: https://github.com/cher-nov/cryptg
|
.. _cryptg: https://github.com/cher-nov/cryptg
|
||||||
.. _pyaes: https://github.com/ricmoo/pyaes
|
.. _pyaes: https://github.com/ricmoo/pyaes
|
||||||
.. _pillow: https://python-pillow.org
|
.. _pillow: https://python-pillow.org
|
||||||
|
|
|
@ -25,13 +25,13 @@ so don't store sensitive data here.
|
||||||
|
|
||||||
Valid phone numbers are ``99966XYYYY``, where ``X`` is the ``dc_id`` and
|
Valid phone numbers are ``99966XYYYY``, where ``X`` is the ``dc_id`` and
|
||||||
``YYYY`` is any number you want, for example, ``1234`` in ``dc_id = 2`` would
|
``YYYY`` is any number you want, for example, ``1234`` in ``dc_id = 2`` would
|
||||||
be ``9996621234``. The code sent by Telegram will be ``dc_id`` repeated five
|
be ``9996621234``. The code sent by Telegram will be ``dc_id`` repeated six
|
||||||
times, in this case, ``22222`` so we can hardcode that:
|
times, in this case, ``222222`` so we can hardcode that:
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
client = TelegramClient(None, api_id, api_hash)
|
client = TelegramClient(None, api_id, api_hash)
|
||||||
client.session.set_dc(2, '149.154.167.40', 80)
|
client.session.set_dc(2, '149.154.167.40', 80)
|
||||||
client.start(
|
client.start(
|
||||||
phone='9996621234', code_callback=lambda: '22222'
|
phone='9996621234', code_callback=lambda: '222222'
|
||||||
)
|
)
|
||||||
|
|
|
@ -362,6 +362,7 @@ VIDEO_CONTENT_TYPE_INVALID,400,The video content type is not supported with the
|
||||||
VIDEO_FILE_INVALID,400,The given video cannot be used
|
VIDEO_FILE_INVALID,400,The given video cannot be used
|
||||||
WALLPAPER_FILE_INVALID,400,The given file cannot be used as a wallpaper
|
WALLPAPER_FILE_INVALID,400,The given file cannot be used as a wallpaper
|
||||||
WALLPAPER_INVALID,400,The input wallpaper was not valid
|
WALLPAPER_INVALID,400,The input wallpaper was not valid
|
||||||
|
WALLPAPER_MIME_INVALID,400,
|
||||||
WC_CONVERT_URL_INVALID,400,WC convert URL invalid
|
WC_CONVERT_URL_INVALID,400,WC convert URL invalid
|
||||||
WEBDOCUMENT_URL_INVALID,400,The given URL cannot be used
|
WEBDOCUMENT_URL_INVALID,400,The given URL cannot be used
|
||||||
WEBPAGE_CURL_FAILED,400,Failure while fetching the webpage with cURL
|
WEBPAGE_CURL_FAILED,400,Failure while fetching the webpage with cURL
|
||||||
|
|
|
|
@ -62,7 +62,7 @@ account.updateStatus,user,SESSION_PASSWORD_NEEDED
|
||||||
account.updateTheme,user,THEME_INVALID
|
account.updateTheme,user,THEME_INVALID
|
||||||
account.updateUsername,user,USERNAME_INVALID USERNAME_NOT_MODIFIED USERNAME_OCCUPIED
|
account.updateUsername,user,USERNAME_INVALID USERNAME_NOT_MODIFIED USERNAME_OCCUPIED
|
||||||
account.uploadTheme,user,
|
account.uploadTheme,user,
|
||||||
account.uploadWallPaper,user,WALLPAPER_FILE_INVALID
|
account.uploadWallPaper,user,WALLPAPER_FILE_INVALID WALLPAPER_MIME_INVALID
|
||||||
account.verifyEmail,user,EMAIL_INVALID
|
account.verifyEmail,user,EMAIL_INVALID
|
||||||
account.verifyPhone,user,
|
account.verifyPhone,user,
|
||||||
auth.acceptLoginToken,user,
|
auth.acceptLoginToken,user,
|
||||||
|
|
|
Loading…
Reference in New Issue
Block a user