Update README.md
This commit is contained in:
parent
d92d969e13
commit
9f023c2c78
33
README.md
33
README.md
@ -3,14 +3,23 @@ This is Telegram API for python.
|
|||||||
Main aim is to implement MTProto protocol Telegram API on pure Python (not wrapped CLI)
|
Main aim is to implement MTProto protocol Telegram API on pure Python (not wrapped CLI)
|
||||||
We'll try to make it work on Python 2 as well as 3.
|
We'll try to make it work on Python 2 as well as 3.
|
||||||
|
|
||||||
Detailed description of API and protokol can be found here:
|
Detailed description of API and protocol can be found here:
|
||||||
https://core.telegram.org/api
|
https://core.telegram.org/api
|
||||||
https://core.telegram.org/mtproto
|
https://core.telegram.org/mtproto
|
||||||
|
|
||||||
Repo doesn't contain any credentials to connect Telegram servers.
|
# Structure
|
||||||
You can get your credentials from http://my.telegram.org
|
|
||||||
|
|
||||||
You shoud plase in the root of your repo 2 files:
|
- mtproto.py
|
||||||
|
- testing.py
|
||||||
|
- prime.py
|
||||||
|
- credentials
|
||||||
|
- rsa.pub
|
||||||
|
|
||||||
|
## Credentials
|
||||||
|
Repo doesn't contain any credentials to connect Telegram servers.
|
||||||
|
You can get yours from http://my.telegram.org
|
||||||
|
|
||||||
|
You should place 2 files in the root of your repo:
|
||||||
- credentials
|
- credentials
|
||||||
- rsa.pub
|
- rsa.pub
|
||||||
|
|
||||||
@ -25,11 +34,25 @@ port: 443
|
|||||||
```
|
```
|
||||||
rsa.pub contains your RSA key.
|
rsa.pub contains your RSA key.
|
||||||
|
|
||||||
|
## mtproto.py
|
||||||
|
|
||||||
# testing.py
|
Contains functions to work with MTproto protocol:
|
||||||
|
- TL schema parsing
|
||||||
|
- serializing and deserializing
|
||||||
|
- manage connections to server
|
||||||
|
- send and receive messages
|
||||||
|
|
||||||
|
## testing.py
|
||||||
|
|
||||||
testing.py is used to test functionality of modules.
|
testing.py is used to test functionality of modules.
|
||||||
Now it makes steps from https://core.telegram.org/mtproto/samples-auth_key:
|
Now it makes steps from https://core.telegram.org/mtproto/samples-auth_key:
|
||||||
- sends PQ request to server
|
- sends PQ request to server
|
||||||
- parses the result
|
- parses the result
|
||||||
- factorizes PQ
|
- factorizes PQ
|
||||||
|
|
||||||
|
## prime.py
|
||||||
|
prime.py is used in PQ factorization. It has been copied from https://stackoverflow.com/questions/4643647/fast-prime-factorization-module
|
||||||
|
|
||||||
|
## TL schema
|
||||||
|
We use JSON format TL Shema. TL Schema file contains information about objects and methods, it is located in TL_schema.JSON file in the root of repo. It is fully equivalent to JSON TL Schema from
|
||||||
|
https://core.telegram.org/schema/mtproto-json
|
||||||
|
Loading…
Reference in New Issue
Block a user