Update docs · hydrogram/hydrogram@1e6a700 · GitHub
Skip to content

Commit 1e6a700

Browse files
committed
Update docs
1 parent e5ae1ac commit 1e6a700

9 files changed

Lines changed: 28 additions & 32 deletions

File tree

docs/source/_static/css/theme.css

Lines changed: 3 additions & 3 deletions

docs/source/pyrogram/Emoji.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
11
Emoji
22
======
3-
4-
.. autoclass:: pyrogram.Emoji
5-
:members:
6-
:undoc-members:

docs/source/pyrogram/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Pyrogram
33

44
In this section you can find a detailed description of the Pyrogram API.
55

6-
:obj:`pyrogram.Client` is the main class you have to deal with.
6+
:class:`Client <pyrogram.Client>` is the main class you have to deal with.
77
You will notice that methods are named after the well established `Telegram Bot API`_ and that most of them accept
88
the same parameters as well, thus offering a familiar look to Bot developers.
99

docs/source/resources/AutoAuthorization.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ Auto Authorization
33

44
Manually writing phone number, phone code and password on the terminal every time you want to login can be tedious.
55
Pyrogram is able to automate both **Log In** and **Sign Up** processes, all you need to do is pass the relevant
6-
parameters when creating a new Client.
6+
parameters when creating a new :class:`Client <pyrogram.Client>`.
77

88
.. note:: If you omit any of the optional parameter required for the authorization, Pyrogram will ask you to
9-
manually write it. For instance, if you don't want to set a *last_name* when creating a new account you
9+
manually write it. For instance, if you don't want to set a ``last_name`` when creating a new account you
1010
have to explicitly pass an empty string ""; the default value (None) will trigger the input() call.
1111

1212
Log In
1313
-------
1414

15-
To automate the **Log In** process, pass your *phone_number* and *password* (if you have one) in the Client parameters.
16-
If you want to retrieve the phone code programmatically, pass a callback function in the *phone_code* field — this
15+
To automate the **Log In** process, pass your ``phone_number`` and ``password`` (if you have one) in the Client parameters.
16+
If you want to retrieve the phone code programmatically, pass a callback function in the ``phone_code`` field — this
1717
function must return the correct phone code as string (e.g., "12345") — otherwise, ignore this parameter, Pyrogram will
1818
ask you to input the phone code manually.
1919

@@ -40,7 +40,7 @@ Sign Up
4040
-------
4141

4242
To automate the **Sign Up** process (i.e., automatically create a new Telegram account), simply fill **both**
43-
*first_name* and *last_name* fields alongside the other parameters; they will be used to automatically create a new
43+
``first_name`` and ``last_name`` fields alongside the other parameters; they will be used to automatically create a new
4444
Telegram account in case the phone number you passed is not registered yet.
4545

4646
.. code-block:: python

docs/source/resources/SOCKS5Proxy.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Usage
2525
- ``1``, ``yes``, ``True`` or ``on``: Enables the proxy
2626
- ``0``, ``no``, ``False`` or ``off``: Disables the proxy
2727

28-
- Alternatively, you can setup your proxy without the need of the *config.ini* file by using the *proxy* parameter
28+
- Alternatively, you can setup your proxy without the need of the ``config.ini`` file by using the *proxy* parameter
2929
in the Client class:
3030

3131
.. code-block:: python
@@ -46,5 +46,5 @@ Usage
4646
4747
...
4848
49-
.. note:: If your proxy doesn't require authorization you can omit *username* and *password* by either leaving the
49+
.. note:: If your proxy doesn't require authorization you can omit ``username`` and ``password`` by either leaving the
5050
values blank/empty or completely delete the lines.

docs/source/resources/TextFormatting.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Beside bold, italic, and pre-formatted code, **Pyrogram does also support inline
88
Markdown Style
99
--------------
1010

11-
To use this mode, pass :obj:`pyrogram.ParseMode.MARKDOWN` or "markdown" in the *parse_mode* field when using
11+
To use this mode, pass :obj:`MARKDOWN <pyrogram.ParseMode.MARKDOWN>` or "markdown" in the *parse_mode* field when using
1212
:obj:`send_message <pyrogram.Client.send_message>`. Use the following syntax in your message:
1313

1414
.. code::
@@ -30,7 +30,7 @@ To use this mode, pass :obj:`pyrogram.ParseMode.MARKDOWN` or "markdown" in the *
3030
HTML Style
3131
----------
3232

33-
To use this mode, pass :obj:`pyrogram.ParseMode.HTML` or "html" in the *parse_mode* field when using
33+
To use this mode, pass :obj:`HTML <pyrogram.ParseMode.HTML>` or "html" in the *parse_mode* field when using
3434
:obj:`send_message <pyrogram.Client.send_message>`. The following tags are currently supported:
3535

3636
.. code::

docs/source/resources/UpdateHandling.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ Update Handling
22
===============
33

44
Updates are events that happen in your Telegram account (incoming messages, new channel posts, user name changes, ...)
5-
and can be handled by using a callback function, that is, a function called every time an :obj:`Update` is received from
5+
and can be handled by using a callback function, that is, a function called every time an ``Update`` is received from
66
Telegram.
77

8-
To set an update handler simply call :obj:`set_update_handler <pyrogram.Client.set_update_handler>`
8+
To set an update handler simply call :meth:`set_update_handler <pyrogram.Client.set_update_handler>`
99
by passing the name of your defined callback function as argument *before* you start the Client.
1010

1111
Here's a complete example on how to set it up:
@@ -28,9 +28,9 @@ Here's a complete example on how to set it up:
2828
if __name__ == "__main__":
2929
main()
3030
31-
The last line of the main() function, :obj:`client.idle() <pyrogram.Client.idle>`, is not strictly necessary but highly
32-
recommended when using the update handler; it will block your script execution until you press :obj:`CTRL`:obj:`C` and
33-
automatically call the :obj:`stop <pyrogram.Client.stop>` method which stops the Client and gently close the underlying
31+
The last line of the main function, :meth:`client.idle() <pyrogram.Client.idle>`, is not strictly necessary but highly
32+
recommended when using the update handler; it will block your script execution until you press ``CTRL+C`` and
33+
automatically call the :meth:`stop <pyrogram.Client.stop>` method which stops the Client and gently close the underlying
3434
connection.
3535

3636
Examples

docs/source/start/BasicUsage.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ Basic Usage
33

44
.. note::
55

6-
All the snippets below assume you have successfully created and started a :obj:`pyrogram.Client` instance.
7-
You also must be authorized, that is, a valid *.session file does exist in your working directory.
6+
All the snippets below assume you have successfully created and started a :class:`Client <pyrogram.Client>`
7+
instance. You also must be authorized, that is, a valid *.session file does exist in your working directory.
88
99
Simple API Access
1010
-----------------
1111

12-
The easiest way to interact with the API is via the :obj:`pyrogram.Client` class which exposes bot-like_ methods.
13-
The purpose of this Client class is to make it even simpler to work with Telegram's API by abstracting the
12+
The easiest way to interact with the API is via the :class:`Client <pyrogram.Client>` class which exposes bot-like_
13+
methods. The purpose of this Client class is to make it even simpler to work with Telegram's API by abstracting the
1414
raw functions listed in the API scheme.
1515

1616
The result is a much cleaner interface that allows you to:
@@ -30,16 +30,16 @@ The result is a much cleaner interface that allows you to:
3030
text="Hi there! I'm using Pyrogram"
3131
)
3232
33-
.. seealso:: For a complete list of the available methods have a look at the :obj:`pyrogram.Client` class.
33+
.. seealso:: For a complete list of the available methods have a look at the :class:`Client <pyrogram.Client>` class.
3434

3535
.. _using-raw-functions:
3636

3737
Using Raw Functions
3838
-------------------
3939

4040
If you want **complete**, low-level access to the Telegram API you have to use the raw
41-
:obj:`functions <pyrogram.api.functions>` and :obj:`types <pyrogram.api.types>` exposed by the ``pyrogram.api``
42-
package and call any Telegram API method you wish using the :obj:`send <pyrogram.Client.send>` method provided by
41+
:mod:`functions <pyrogram.api.functions>` and :mod:`types <pyrogram.api.types>` exposed by the ``pyrogram.api``
42+
package and call any Telegram API method you wish using the :meth:`send <pyrogram.Client.send>` method provided by
4343
the Client class.
4444

4545
Here some examples:

docs/source/start/ProjectSetup.rst

Lines changed: 3 additions & 3 deletions

0 commit comments

Comments
 (0)