Skip to content

Commit eadda55

Browse files
committed
Docs revamp. Part 3
1 parent f7cdc7a commit eadda55

25 files changed

+230
-104
lines changed

compiler/docs/compiler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import shutil
2222

2323
HOME = "compiler/docs"
24-
DESTINATION = "docs/source"
24+
DESTINATION = "docs/source/telegram"
2525

2626
FUNCTIONS_PATH = "pyrogram/api/functions"
2727
TYPES_PATH = "pyrogram/api/types"
@@ -129,6 +129,6 @@ def start():
129129
FUNCTIONS_PATH = "../../pyrogram/api/functions"
130130
TYPES_PATH = "../../pyrogram/api/types"
131131
HOME = "."
132-
DESTINATION = "../../docs/source"
132+
DESTINATION = "../../docs/source/telegram"
133133

134134
start()

docs/source/api/client.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Pyrogram Client
2+
===============
3+
4+
The :class:`Client <pyrogram.Client>` is the main class. It exposes easy-to-use methods that are named
5+
after the well established Telegram Bot API methods, thus offering a familiar look to Bot developers.
6+
7+
.. autoclass:: pyrogram.Client()
File renamed without changes.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Errors
2-
======
1+
RPC Errors
2+
==========
33

44
All the Pyrogram errors listed here live inside the ``errors`` sub-package.
55

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

44
.. autoclass:: pyrogram.Filters
55
:members:
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/source/core/client.rst

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/source/index.rst

Lines changed: 71 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -54,26 +54,54 @@ Welcome to Pyrogram
5454
5555
app.run()
5656
57-
**Pyrogram** is an elegant, easy-to-use Telegram_ client library and framework written from the ground up in Python and C.
58-
It enables you to easily create custom apps using both user and bot identities (bot API alternative) via the `MTProto API`_.
57+
**Pyrogram** is an elegant, easy-to-use Telegram_ client library and framework written from the ground up in Python and
58+
C. It enables you to easily create custom apps using both user and bot identities (bot API alternative) via the
59+
`MTProto API`_.
5960

60-
How the documentation is organized
61+
.. _Telegram: https://telegram.org
62+
.. _MTProto API: https://core.telegram.org/api#telegram-api
63+
64+
How the Documentation is Organized
6165
----------------------------------
6266

63-
Contents are organized into self-contained topics and can be accessed from the sidebar, or by following them in order
64-
using the Next button at the end of each page.
67+
Contents are organized into self-contained topics and can be all accessed from the sidebar, or by following them in
68+
order using the Next button at the end of each page. Here below you can find a list of the most relevant pages.
69+
70+
Getting Started
71+
^^^^^^^^^^^^^^^
72+
73+
- `Quick Start`_ - Overview to get you started as fast as possible.
74+
- `Calling Methods`_ - How to use Pyrogram's API.
75+
- `Handling Updates`_ - How to handle Telegram updates.
76+
- `Error Handling`_ - How to handle API errors correctly.
77+
78+
.. _Quick Start: intro/start
79+
.. _Calling Methods: start/invoking
80+
.. _Handling Updates: start/updates
81+
.. _Error Handling: start/errors
82+
83+
API Reference
84+
^^^^^^^^^^^^^
85+
- `Client Class`_ - Details about the Client class.
86+
- `Available Methods`_ - A list of available high-level methods.
87+
- `Available Types`_ - A list of available high-level types.
6588

66-
Relevant Pages
67-
^^^^^^^^^^^^^^
89+
.. _Client Class: core/client
90+
.. _Available Methods: core/methods
91+
.. _Available Types: core/types
6892

69-
- `Quick Start`_ - Concise steps to get you started as fast as possible.
70-
- `API Usage`_ - Guide on how to use Pyrogram's API.
71-
- `Update Handling`_ - Guide on how to handle Telegram updates.
72-
- Client_ - Reference details about the Client class.
73-
- Types_ - All the available Pyrogram types.
74-
- Methods_ - All the available Pyrogram methods.
93+
Topics
94+
^^^^^^
7595

76-
**To get started, press the Next button**
96+
- `Smart Plugins`_ - How to modularize your application.
97+
- `Advanced Usage`_ - How to use Telegram's raw API.
98+
- `Release Notes`_ - Release notes for Pyrogram releases.
99+
- `Pyrogram FAQ`_ - Answers to common Pyrogram questions.
100+
101+
.. _Smart Plugins: topics/smart-plugins
102+
.. _Advanced Usage: topics/advanced-usage
103+
.. _Release Notes: topics/releases
104+
.. _Pyrogram FAQ: topics/faq
77105

78106
.. toctree::
79107
:hidden:
@@ -82,55 +110,51 @@ Relevant Pages
82110
intro/start
83111
intro/install
84112
intro/setup
113+
114+
.. toctree::
115+
:hidden:
116+
:caption: Getting Started
117+
85118
intro/auth
119+
start/invoking
120+
start/updates
121+
start/errors
122+
123+
.. toctree::
124+
:hidden:
125+
:caption: API Reference
126+
127+
api/client
128+
api/methods
129+
api/types
130+
api/handlers
131+
api/decorators
132+
api/filters
133+
api/errors
86134

87135
.. toctree::
88136
:hidden:
89137
:caption: Topic Guides
90138

91-
topics/usage
92-
topics/update-handling
93-
topics/using-filters
139+
topics/filters
94140
topics/more-on-updates
95-
topics/configuration-file
141+
topics/config-file
96142
topics/smart-plugins
97-
topics/auto-authorization
98-
topics/customize-sessions
143+
topics/auto-auth
144+
topics/session-settings
99145
topics/tgcrypto
100146
topics/text-formatting
101-
topics/socks5-proxy
147+
topics/proxy
102148
topics/bots-interaction
103-
topics/error-handling
104149
topics/test-servers
105150
topics/advanced-usage
106151
topics/voice-calls
107-
topics/changelog
108-
109-
.. toctree::
110-
:hidden:
111-
:caption: API Reference
112-
113-
core/client
114-
core/types
115-
core/methods
116-
core/handlers
117-
core/decorators
118-
core/filters
119-
core/errors
152+
topics/releases
153+
topics/faq
120154

121155
.. toctree::
122156
:hidden:
123157
:caption: Telegram API
124158

125-
functions/index
126-
types/index
127-
128-
.. _Telegram: https://telegram.org
129-
.. _TgCrypto: https://docs.pyrogram.ml/resources/TgCrypto
130-
.. _MTProto API: https://core.telegram.org/api#telegram-api
131-
.. _Quick Start: intro/start.html
132-
.. _API Usage: topics/usage.html
133-
.. _Update Handling: topics/update-handling.html
134-
.. _Client: core/client.html
135-
.. _Types: core/types.html
136-
.. _Methods: core/methods
159+
telegram/functions/index
160+
telegram/types/index

0 commit comments

Comments
 (0)