2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-08-28 21:07:59 +00:00

Fix some cross references

This commit is contained in:
Dan 2019-07-09 20:02:51 +02:00
parent b352ef334e
commit 448a65bb6d
3 changed files with 14 additions and 14 deletions

View File

@ -142,9 +142,9 @@ API Reference
:columns: 2 :columns: 2
- :doc:`Pyrogram Client <api/client>`: Reference details about the Client class. - :doc:`Pyrogram Client <api/client>`: Reference details about the Client class.
- :doc:`Available Methods <api/methods>`: List of available high-level methods. - :doc:`Available Methods <api/methods/index>`: List of available high-level methods.
- :doc:`Available Types <api/types>`: List of available high-level types. - :doc:`Available Types <api/types/index>`: List of available high-level types.
- :doc:`Bound Methods <api/bound-methods>`: List of convenient bound methods. - :doc:`Bound Methods <api/bound-methods/index>`: List of convenient bound methods.
Meta Meta
^^^^ ^^^^

View File

@ -1,9 +1,9 @@
Advanced Usage Advanced Usage
============== ==============
Pyrogram's API, which consists of well documented convenience :doc:`methods <../api/methods>` and facade Pyrogram's API, which consists of well documented convenience :doc:`methods <../api/methods/index>` and facade
:doc:`types <../api/types>`, exists to provide a much easier interface to the undocumented and often confusing Telegram :doc:`types <../api/types/index>`, exists to provide a much easier interface to the undocumented and often confusing
API. Telegram API.
In this section, you'll be shown the alternative way of communicating with Telegram using Pyrogram: the main "raw" In this section, you'll be shown the alternative way of communicating with Telegram using Pyrogram: the main "raw"
Telegram API with its functions and types. Telegram API with its functions and types.
@ -23,21 +23,21 @@ some pitfalls to take into consideration when working with the raw API.
Every available high-level methods in Pyrogram is built on top of these raw functions. Every available high-level methods in Pyrogram is built on top of these raw functions.
Nothing stops you from using the raw functions only, but they are rather complex and Nothing stops you from using the raw functions only, but they are rather complex and
:doc:`plenty of them <../api/methods>` are already re-implemented by providing a much simpler and cleaner interface :doc:`plenty of them <../api/methods/index>` are already re-implemented by providing a much simpler and cleaner
which is very similar to the Bot API (yet much more powerful). interface which is very similar to the Bot API (yet much more powerful).
If you think a raw function should be wrapped and added as a high-level method, feel free to ask in our Community_! If you think a raw function should be wrapped and added as a high-level method, feel free to ask in our Community_!
Invoking Functions Invoking Functions
^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^
Unlike the :doc:`methods <../api/methods>` found in Pyrogram's API, which can be called in the usual simple way, Unlike the :doc:`methods <../api/methods/index>` found in Pyrogram's API, which can be called in the usual simple way,
functions to be invoked from the raw Telegram API have a different way of usage and are more complex. functions to be invoked from the raw Telegram API have a different way of usage and are more complex.
First of all, both :doc:`raw functions <../telegram/functions/index>` and :doc:`raw types <../telegram/types/index>` live in their First of all, both :doc:`raw functions <../telegram/functions/index>` and :doc:`raw types <../telegram/types/index>`
respective packages (and sub-packages): ``pyrogram.api.functions``, ``pyrogram.api.types``. They all exist as Python live in their respective packages (and sub-packages): ``pyrogram.api.functions``, ``pyrogram.api.types``. They all exist
classes, meaning you need to create an instance of each every time you need them and fill them in with the correct as Python classes, meaning you need to create an instance of each every time you need them and fill them in with the
values using named arguments. correct values using named arguments.
Next, to actually invoke the raw function you have to use the :meth:`~pyrogram.Client.send` method provided by the Next, to actually invoke the raw function you have to use the :meth:`~pyrogram.Client.send` method provided by the
Client class and pass the function object you created. Client class and pass the function object you created.

View File

@ -9,7 +9,7 @@ For Humans - str(obj)
--------------------- ---------------------
If you want a nicely formatted, human readable JSON representation of any object in the API -- namely, any object from If you want a nicely formatted, human readable JSON representation of any object in the API -- namely, any object from
:doc:`Pyrogram types <../api/types>`, :doc:`raw functions <../telegram/functions/index>` and :doc:`Pyrogram types <../api/types/index>`, :doc:`raw functions <../telegram/functions/index>` and
:doc:`raw types <../telegram/types/index>` -- you can use use ``str(obj)``. :doc:`raw types <../telegram/types/index>` -- you can use use ``str(obj)``.
.. code-block:: python .. code-block:: python