Commit Graph

34 Commits

Author SHA1 Message Date
Dan
d243ebc2cd Performance improvements 2019-06-01 13:18:48 +02:00
Dan
a984558860 Rename methods dealing with profile pictures 2019-05-31 00:20:09 +02:00
Dan
55599e33c6 Rework download_media to accommodate L100 changes 2019-05-29 10:40:37 +02:00
Dan
518220431e Docs revamp. Part 5 2019-05-18 01:45:01 +02:00
Dan
01f0af6bb0 Increase OFFLINE_SLEEP to 15 minutes
This avoid frequent dialogs fetch while debugging with user accounts
2019-05-06 16:36:57 +02:00
Dan
63d76a7f13 Bring back automatic mime type detection for new uploads (fixes #239)
- Add mime.types file to contain a good database of type -> ext mappings
  from svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types

- Load mime.type at BaseClient creation and add two convenience methods
  for guessing mime types from filenames and extensions from mime types,
  guess_mime_type and guess_extension

- Make all send_* method as well as download_media use the new mime type
  database via guess_mime_type and guess_extension methods
2019-04-20 18:56:30 +02:00
Dan
ef5dd96bdc Fix broken mentions for both HTML and Markdown 2019-03-26 13:32:30 +01:00
Dan
fede74398c Fix inline-mode branch breaking after many commits from develop 2019-03-21 18:37:00 +01:00
bakatrouble
f84f9ec4df Add bot_token argument (#221)
* Add bot_token argument (closes #123)

* Make session_name docs more readable and detailed

* Explicitely set is_bot=False
2019-03-01 18:30:39 +01:00
Dan
44deabf399 Update iter_chat_members efficiency 2019-01-24 17:21:41 +01:00
Dan
c28b9f9a2c Add StopTransmission custom exception
Useful for stopping up/downloads after they started
2019-01-11 14:00:03 +01:00
Dan
153439ac88 Add iter_chat_members method. Reference #170 2019-01-04 17:13:44 +01:00
Dan
948f2b44ed Add iter_dialogs method. Reference #170 2019-01-04 16:10:34 +01:00
Dan
fe89974523 Add get_history signature to BaseClient
Also make other method parameters generic
2019-01-04 14:37:26 +01:00
Dan
4f6990d735 Add takeout parameter in Client
This lets the client use a takeout session instead of a normal one.
Takeout sessions are useful for exporting Telegram data. Methods invoked
inside a takeout session are less prone to throw FloodWait exceptions.
2019-01-03 12:20:42 +01:00
Dan
372bbabe28 Make invite links of public channels work with get_chat 2019-01-02 22:39:16 +01:00
Dan
4d7b1bafac Update copyright year 2019-01-01 12:36:16 +01:00
Dan
39636f2843 Update get_messages signature 2018-10-28 17:18:00 +01:00
Dan
1fe46610cd Make plugins disabled by default
Users need to explicitly set plugins_dir parameter
2018-10-21 09:42:22 +02:00
Dan
345ac6e16a Merge branch 'develop' into plugins 2018-10-13 10:42:07 +02:00
Dan
9649b1457c Don't make use of hardcoded default int values too 2018-10-13 10:41:58 +02:00
Dan
340fb9c145 Merge branch 'develop' into plugins
# Conflicts:
#	pyrogram/client/client.py
#	pyrogram/client/ext/base_client.py
2018-10-13 10:39:47 +02:00
Dan
a32009a79d Don't make use of hardcoded default string values 2018-10-13 10:38:44 +02:00
Dan
0b79f96b4f Turn hardcoded plugins dir into a constant 2018-10-12 14:19:26 +02:00
Dan
2779e33d13 Rename "token" to "bot_token" 2018-09-10 19:55:53 +02:00
Dan
21d914e414 Remove unused constant 2018-08-19 19:40:23 +02:00
Dan
6cc87d50c9 Rename media type id to animation 2018-08-06 21:32:38 +02:00
Dan
f4c0793a0b Make session leaner by removing some redundant parameters
Related to #86
2018-06-24 18:27:41 +02:00
Dan
69d1432251 Allow user-defined values for retries and timeout 2018-06-24 17:47:29 +02:00
Dan
329bac6ab0 Better invite link regex pattern 2018-06-13 20:53:31 +02:00
Dan
9001ccd11f Add DisconnectHandler 2018-05-23 14:27:17 +02:00
Dan
e1e0029cc5 Rename media type 1 to chat_photo 2018-05-11 11:57:05 +02:00
Dan
14f23d388c Clean get_history 2018-05-09 20:27:29 +02:00
Dan
8454d438be Refactor the project by using Mixin classes
This will cut client.py down from ~4k to ~1k SLOC and also
makes the whole project tidier and more organized.
2018-05-07 14:30:55 +02:00