Rename and rework Setup docs page

This commit is contained in:
Dan 2018-06-05 16:37:57 +02:00
parent 95e16c2e6c
commit 2a79243841
2 changed files with 11 additions and 9 deletions

View File

@ -1,8 +1,9 @@
Project Setup Setup
============= =====
This section provides all the information you need to setup your project with Pyrogram. Once you successfully installed_ Pyrogram, you will have to follow a few steps before you can actually use
There are a few steps you have to follow before you can actually use the library to make API calls. the library to make API calls. This section provides all the information you need in order to set up a project
with Pyrogram.
API Keys API Keys
-------- --------
@ -45,7 +46,7 @@ There are two ways to configure a Pyrogram application project, and you can choo
) )
.. note:: The examples below assume you have created a ``config.ini`` file, thus they won't show the *api_id* .. note:: The examples below assume you have created a ``config.ini`` file, thus they won't show the *api_id*
and *api_hash* parameters usage. and *api_hash* parameters usage.
User Authorization User Authorization
------------------ ------------------
@ -75,14 +76,14 @@ After successfully authorizing yourself, a new file called ``my_account.session`
Pyrogram executing API calls with your identity. This file will be loaded again when you restart your app, Pyrogram executing API calls with your identity. This file will be loaded again when you restart your app,
and as long as you keep the session alive, Pyrogram won't ask you again to enter your phone number. and as long as you keep the session alive, Pyrogram won't ask you again to enter your phone number.
.. important:: Your *.session file(s) must be kept secret. .. important:: Your ``*.session`` file(s) must be kept secret.
Bot Authorization Bot Authorization
----------------- -----------------
Being written entirely from the ground up, Pyrogram is also able to authorize Bots. Being written entirely from the ground up, Pyrogram is also able to authorize Bots.
Bots are a special kind of users which also make use of MTProto. This means that you can use Pyrogram to Bots are a special kind of users which also make use of MTProto, the underlying Telegram protocol.
execute API calls with a Bot identity. This means that you can use Pyrogram to execute API calls with a Bot identity.
Instead of phone numbers, Bots are authorized via their tokens which are created by BotFather_: Instead of phone numbers, Bots are authorized via their tokens which are created by BotFather_:
@ -96,5 +97,6 @@ Instead of phone numbers, Bots are authorized via their tokens which are created
That's all, no further action is needed. The session file will be named after the Bot user_id, which is That's all, no further action is needed. The session file will be named after the Bot user_id, which is
``123456.session`` for the example above. ``123456.session`` for the example above.
.. _installed: Installation.html
.. _`Country Code`: https://en.wikipedia.org/wiki/List_of_country_calling_codes .. _`Country Code`: https://en.wikipedia.org/wiki/List_of_country_calling_codes
.. _BotFather: https://t.me/botfather .. _BotFather: https://t.me/botfather

View File

@ -16,5 +16,5 @@
# You should have received a copy of the GNU Lesser General Public License # You should have received a copy of the GNU Lesser General Public License
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>. # along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
from .error import UnknownError
from .exceptions import * from .exceptions import *
from .error import UnknownError