From 448a65bb6d65fc8eb5af006dd9e34444fbc81fb5 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Tue, 9 Jul 2019 20:02:51 +0200 Subject: [PATCH] Fix some cross references --- docs/source/index.rst | 6 +++--- docs/source/topics/advanced-usage.rst | 20 ++++++++++---------- docs/source/topics/serialize.rst | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/source/index.rst b/docs/source/index.rst index 3743cf30..5cb9bb2e 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -142,9 +142,9 @@ API Reference :columns: 2 - :doc:`Pyrogram Client `: Reference details about the Client class. - - :doc:`Available Methods `: List of available high-level methods. - - :doc:`Available Types `: List of available high-level types. - - :doc:`Bound Methods `: List of convenient bound methods. + - :doc:`Available Methods `: List of available high-level methods. + - :doc:`Available Types `: List of available high-level types. + - :doc:`Bound Methods `: List of convenient bound methods. Meta ^^^^ diff --git a/docs/source/topics/advanced-usage.rst b/docs/source/topics/advanced-usage.rst index 9c794be0..1460a3d8 100644 --- a/docs/source/topics/advanced-usage.rst +++ b/docs/source/topics/advanced-usage.rst @@ -1,9 +1,9 @@ Advanced Usage ============== -Pyrogram's API, which consists of well documented convenience :doc:`methods <../api/methods>` and facade -:doc:`types <../api/types>`, exists to provide a much easier interface to the undocumented and often confusing Telegram -API. +Pyrogram's API, which consists of well documented convenience :doc:`methods <../api/methods/index>` and facade +:doc:`types <../api/types/index>`, exists to provide a much easier interface to the undocumented and often confusing +Telegram API. 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. @@ -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. 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 - which is very similar to the Bot API (yet much more powerful). + :doc:`plenty of them <../api/methods/index>` are already re-implemented by providing a much simpler and cleaner + 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_! 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. -First of all, both :doc:`raw functions <../telegram/functions/index>` and :doc:`raw types <../telegram/types/index>` live in their -respective packages (and sub-packages): ``pyrogram.api.functions``, ``pyrogram.api.types``. They all exist as Python -classes, meaning you need to create an instance of each every time you need them and fill them in with the correct -values using named arguments. +First of all, both :doc:`raw functions <../telegram/functions/index>` and :doc:`raw types <../telegram/types/index>` +live in their respective packages (and sub-packages): ``pyrogram.api.functions``, ``pyrogram.api.types``. They all exist +as Python classes, meaning you need to create an instance of each every time you need them and fill them in with the +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 Client class and pass the function object you created. diff --git a/docs/source/topics/serialize.rst b/docs/source/topics/serialize.rst index a238f8dc..4c0b2327 100644 --- a/docs/source/topics/serialize.rst +++ b/docs/source/topics/serialize.rst @@ -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 -: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)``. .. code-block:: python