-
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: wulan17 <[email protected]>
- Loading branch information
Showing
88 changed files
with
3,796 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
export DOCS_KEY | ||
export VENV=$(pwd)/venv | ||
|
||
make clean | ||
make clean-docs | ||
make venv | ||
make api | ||
"$VENV"/bin/pip install -r docs/requirements.txt | ||
cd compiler/docs && "$VENV"/bin/python compiler.py | ||
cd ../.. | ||
"$VENV"/bin/sphinx-build -b html "docs/source" "docs/build/html" -j auto | ||
git clone https://wulan17:"$DOCS_KEY"@github.com/Mayuri-Chan/pyrofork-docs.git | ||
cp -r docs/build/html/* pyrofork-docs | ||
cd pyrofork-docs | ||
git config --local user.name "Mayuri-Chan" | ||
git config --local user.email "[email protected]" | ||
git add --all | ||
git commit -a -m "docs: Update docs $(date '+%Y-%m-%d | %H:%m:%S %p %Z')" --signoff | ||
git push -u origin --all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
pyston_lite-autoload | ||
sphinx | ||
sphinx_rtd_theme==1.2.2 | ||
sphinx_copybutton | ||
sphinx-autobuild | ||
tgcrypto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Pyrofork Client | ||
=============== | ||
|
||
You have entered the API Reference section where you can find detailed information about Pyrofork's API. The main Client | ||
class, all available methods and types, filters, handlers, decorators and bound-methods detailed descriptions can be | ||
found starting from this page. | ||
|
||
This page is about the Client class, which exposes high-level methods for an easy access to the API. | ||
|
||
.. code-block:: python | ||
from pyrogram import Client | ||
app = Client("my_account") | ||
with app: | ||
app.send_message("me", "Hi!") | ||
----- | ||
|
||
Details | ||
------- | ||
|
||
.. autoclass:: pyrogram.Client() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
Decorators | ||
========== | ||
|
||
Decorators are able to register callback functions for handling updates in a much easier and cleaner way compared to | ||
:doc:`Handlers <handlers>`; they do so by instantiating the correct handler and calling | ||
:meth:`~pyrogram.Client.add_handler` automatically. All you need to do is adding the decorators on top of your | ||
functions. | ||
|
||
.. code-block:: python | ||
from pyrogram import Client | ||
app = Client("my_account") | ||
@app.on_message() | ||
def log(client, message): | ||
print(message) | ||
app.run() | ||
.. contents:: Contents | ||
:backlinks: none | ||
:depth: 1 | ||
:local: | ||
|
||
----- | ||
|
||
.. currentmodule:: pyrogram | ||
|
||
Index | ||
----- | ||
|
||
.. hlist:: | ||
:columns: 3 | ||
|
||
- :meth:`~Client.on_message` | ||
- :meth:`~Client.on_edited_message` | ||
- :meth:`~Client.on_callback_query` | ||
- :meth:`~Client.on_inline_query` | ||
- :meth:`~Client.on_chosen_inline_result` | ||
- :meth:`~Client.on_chat_member_updated` | ||
- :meth:`~Client.on_chat_join_request` | ||
- :meth:`~Client.on_deleted_messages` | ||
- :meth:`~Client.on_user_status` | ||
- :meth:`~Client.on_poll` | ||
- :meth:`~Client.on_disconnect` | ||
- :meth:`~Client.on_raw_update` | ||
|
||
----- | ||
|
||
Details | ||
------- | ||
|
||
.. Decorators | ||
.. autodecorator:: pyrogram.Client.on_message() | ||
.. autodecorator:: pyrogram.Client.on_edited_message() | ||
.. autodecorator:: pyrogram.Client.on_callback_query() | ||
.. autodecorator:: pyrogram.Client.on_inline_query() | ||
.. autodecorator:: pyrogram.Client.on_chosen_inline_result() | ||
.. autodecorator:: pyrogram.Client.on_chat_member_updated() | ||
.. autodecorator:: pyrogram.Client.on_chat_join_request() | ||
.. autodecorator:: pyrogram.Client.on_deleted_messages() | ||
.. autodecorator:: pyrogram.Client.on_user_status() | ||
.. autodecorator:: pyrogram.Client.on_poll() | ||
.. autodecorator:: pyrogram.Client.on_disconnect() | ||
.. autodecorator:: pyrogram.Client.on_raw_update() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
ChatAction | ||
========== | ||
|
||
.. autoclass:: pyrogram.enums.ChatAction() | ||
:members: | ||
|
||
.. raw:: html | ||
:file: ./cleanup.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
ChatEventAction | ||
=============== | ||
|
||
.. autoclass:: pyrogram.enums.ChatEventAction() | ||
:members: | ||
|
||
.. raw:: html | ||
:file: ./cleanup.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
ChatMemberStatus | ||
================ | ||
|
||
.. autoclass:: pyrogram.enums.ChatMemberStatus() | ||
:members: | ||
|
||
.. raw:: html | ||
:file: ./cleanup.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
ChatMembersFilter | ||
================= | ||
|
||
.. autoclass:: pyrogram.enums.ChatMembersFilter() | ||
:members: | ||
|
||
.. raw:: html | ||
:file: ./cleanup.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
ChatType | ||
======== | ||
|
||
.. autoclass:: pyrogram.enums.ChatType() | ||
:members: | ||
|
||
.. raw:: html | ||
:file: ./cleanup.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
MessageEntityType | ||
================= | ||
|
||
.. autoclass:: pyrogram.enums.MessageEntityType() | ||
:members: | ||
|
||
.. raw:: html | ||
:file: ./cleanup.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
MessageMediaType | ||
================ | ||
|
||
.. autoclass:: pyrogram.enums.MessageMediaType() | ||
:members: | ||
|
||
.. raw:: html | ||
:file: ./cleanup.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
MessageServiceType | ||
================== | ||
|
||
.. autoclass:: pyrogram.enums.MessageServiceType() | ||
:members: | ||
|
||
.. raw:: html | ||
:file: ./cleanup.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
MessagesFilter | ||
============== | ||
|
||
.. autoclass:: pyrogram.enums.MessagesFilter() | ||
:members: | ||
|
||
.. raw:: html | ||
:file: ./cleanup.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
NextCodeType | ||
============ | ||
|
||
.. autoclass:: pyrogram.enums.NextCodeType() | ||
:members: | ||
|
||
.. raw:: html | ||
:file: ./cleanup.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
ParseMode | ||
========= | ||
|
||
.. autoclass:: pyrogram.enums.ParseMode() | ||
:members: | ||
|
||
.. raw:: html | ||
:file: ./cleanup.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
PollType | ||
======== | ||
|
||
.. autoclass:: pyrogram.enums.PollType() | ||
:members: | ||
|
||
.. raw:: html | ||
:file: ./cleanup.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
SentCodeType | ||
============ | ||
|
||
.. autoclass:: pyrogram.enums.SentCodeType() | ||
:members: | ||
|
||
.. raw:: html | ||
:file: ./cleanup.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
UserStatus | ||
========== | ||
|
||
.. autoclass:: pyrogram.enums.UserStatus() | ||
:members: | ||
|
||
.. raw:: html | ||
:file: ./cleanup.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<script> | ||
document | ||
.querySelectorAll("em.property") | ||
.forEach((elem, i) => i !== 0 ? elem.remove() : true) | ||
|
||
document | ||
.querySelectorAll("a.headerlink") | ||
.forEach((elem, i) => [0, 1].includes(i) ? true : elem.remove()) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
Enumerations | ||
============ | ||
|
||
This page is about Pyrofork enumerations. | ||
Enumerations are types that hold a group of related values to be used whenever a constant value is required. | ||
They will help you deal with those values in a type-safe way and also enable code completion so that you can be sure | ||
to apply only a valid value among the expected ones. | ||
|
||
----- | ||
|
||
.. currentmodule:: pyrogram.enums | ||
|
||
.. autosummary:: | ||
:nosignatures: | ||
|
||
ChatAction | ||
ChatEventAction | ||
ChatMemberStatus | ||
ChatMembersFilter | ||
ChatType | ||
MessageEntityType | ||
MessageMediaType | ||
MessageServiceType | ||
MessagesFilter | ||
ParseMode | ||
PollType | ||
SentCodeType | ||
NextCodeType | ||
UserStatus | ||
|
||
.. toctree:: | ||
:hidden: | ||
|
||
ChatAction | ||
ChatEventAction | ||
ChatMemberStatus | ||
ChatMembersFilter | ||
ChatType | ||
MessageEntityType | ||
MessageMediaType | ||
MessageServiceType | ||
MessagesFilter | ||
ParseMode | ||
PollType | ||
SentCodeType | ||
NextCodeType | ||
UserStatus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
400 - BadRequest | ||
---------------- | ||
|
||
.. csv-table:: | ||
:file: ../../../../compiler/errors/source/400_BAD_REQUEST.tsv | ||
:delim: tab | ||
:header-rows: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
420 - Flood | ||
----------- | ||
|
||
.. csv-table:: | ||
:file: ../../../../compiler/errors/source/420_FLOOD.tsv | ||
:delim: tab | ||
:header-rows: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
403 - Forbidden | ||
--------------- | ||
|
||
.. csv-table:: | ||
:file: ../../../../compiler/errors/source/403_FORBIDDEN.tsv | ||
:delim: tab | ||
:header-rows: 1 |
Oops, something went wrong.