Commit graph

139 commits

Author SHA1 Message Date
Noam Meltzer
9b74625d4a answerCallbackQuery: fix copy/paste: show_alert -> url 2016-10-04 00:55:29 +03:00
Jacob Bom
358dd795c7 Add the rest of game_ methods to bot. 2016-10-03 20:43:02 +02:00
Jacob Bom
151a441af7 Add send_game 2016-10-03 20:40:17 +02:00
Noam Meltzer
e8a34d8eef cosmetic fixes and documentation for getWebhookInfo 2016-10-03 20:43:10 +03:00
Jacob Bom
34c62a633b Add url to answerCallbackQuery 2016-10-03 15:25:07 +02:00
Jacob Bom
868d9217bc Add WebhookInfo and getWebhookInfo
Still needs tests though
2016-10-03 15:16:43 +02:00
Jacob Bom
f7ede4baea Add caption fields to voice and audio
Or at least the methods/classes for sending.
2016-10-03 15:05:49 +02:00
Jannes Höke
5116a77221 Class methods (#362)
* bot.py: add create_references method

* create bot reference in webhook handler, use create_references on new updates

* message.py: implement reply_text

* echobot2.py: use Message.reply_text

* fix create_references in webhook handler

* add some more instance methods

* Chat.kick_member and unban_member

* bot.py: Create bot references in outgoing messages

* add tests for everything testable

* test_updater.py: add create_references method to MockBot

* remove Bot.create_references and refactor TelegramObject.de_json to take the additional parameter bot

* List bot as named kwarg where used

* file.py: Use Bot.request property instead of Bot._request attr
2016-09-20 06:36:55 +02:00
Noam Meltzer
e4a132c0e4 Reusable dispatcher (#402)
* Create a Request class which maintains its own connection pool
* When creating a Bot instance a new Request instance will be created if one wasn't supplied.
* Updater is responsible for creating a Request instance if a Bot instance wasn't provided.
* Dispatcher: add method to run async functions without decorator
* Dispatcher can now run as a singleton (allowing run_async decorator to work) as it always did and as multiple instances (where run_async decorator will raise RuntimeError)
2016-09-06 16:38:07 +03:00
Rahiel Kasim
da87d4ba78 fix yapf 2016-08-26 11:17:05 +02:00
Rahiel Kasim
00bba73673 drop Python 2.6 support (closes #245) (#386)
* drop Python 2.6 support (closes #245)

* fix NullHandler import

* README: explicitly mention Py3 and PyPy compatibility
2016-08-20 22:01:07 +02:00
leandrotoledo
bbbc622517 Adds @message decorator to editMessageText #320 2016-06-03 13:28:29 -04:00
Noam Meltzer
7e7acdeb23 set default network_delay to 5 seconds
fixes #309
2016-05-28 19:34:16 +03:00
Leandro Toledo
9a13de4a96 Merge remote-tracking branch 'origin/master' into bot2.1
Conflicts:
	telegram/bot.py
	tests/test_bot.py
2016-05-26 16:15:50 -03:00
Noam Meltzer
561f1c3f02 bot: validate token does not contain white spaces (#306)
in addition move validation code from validate.py into bot.py and delete
the former file
2016-05-26 22:09:14 +03:00
Rahiel Kasim
1abbca3324 bot.py: fix snake_case alias 2016-05-26 15:32:02 +02:00
Leandro Toledo
37c7af2e14 Add docstrings #302 2016-05-25 21:41:12 -03:00
Leandro Toledo
ab2f6e13c9 Add kwargs to API calls #302 2016-05-23 20:43:17 -03:00
Leandro Toledo
d7e226ec0f Add new Bot methods and ChatMember class #302 2016-05-23 20:22:31 -03:00
Leandro Toledo
49122d6a99 Remove \ from base code #259 2016-05-14 23:26:56 -03:00
Leandro Toledo
d445d35ceb Running yapf for codebase #259 2016-05-14 22:46:40 -03:00
Rahiel Kasim
6e9f30ca6e fix merge conflict snakes 2016-05-02 16:37:45 +02:00
Djaler
4b0be65a76 Fix Bot.getUpdates() docstring 2016-05-01 15:25:07 +03:00
Rahiel Kasim
5971cb35f8 fix merge conflict snakes with master 2016-04-30 14:56:48 +02:00
Jannes Höke
d940afa718 merge master into cr4.0 2016-04-29 18:37:41 +02:00
Rahiel Kasim
ec15e866be add snake_case aliases for CamelCase methods 2016-04-28 12:20:42 +02:00
Noam Meltzer
0c74b3cfb9 bot.py + request.py: network_delay is unique for getUpdates 2016-04-28 01:41:32 +03:00
Jannes Höke
7f463131aa re-order imports 2016-04-27 00:28:21 +02:00
Noam Meltzer
a686db2c6f bot.Bot: fix class docstring 2016-04-26 23:31:29 +03:00
leandrotoledo
1f29093027 Merge branch 'unittest-bot2.0' of https://github.com/python-telegram-bot/python-telegram-bot into unittest-bot2.0 2016-04-26 14:17:59 -03:00
Noam Meltzer
49385493f4 bot: 'if X is not None' is cleaner approach 2016-04-26 17:47:37 +03:00
Leandro Toledo
fc7c161018 Merge remote-tracking branch 'origin/master' into unittest-bot2.0 2016-04-24 14:33:17 -03:00
Andrea Giove
39ba575a4d
Missing a comma 2016-04-24 17:54:36 +02:00
Andrea Giove
87ac962805
Added caption paramenter to sendDocument method 2016-04-24 17:51:15 +02:00
Leandro Toledo
14cb13acfd Adds @message decorator to editMessageText 2016-04-24 11:19:37 -03:00
Leandro Toledo
4ecb4911db Adds @message decorator to editMessageText 2016-04-24 11:18:16 -03:00
Leandro Toledo
adc3104214 Add timeout and network_delay kwargs to all bot methods. 2016-04-24 10:06:59 -03:00
Leandro Toledo
b444cd7bce Adding new modules to docs #232 2016-04-22 11:07:44 -03:00
Leandro Toledo
0669c72fe3 Fixing little princes Python 2.6 string format arg #232 2016-04-21 12:18:51 -03:00
Leandro Toledo
5315e072cb PEP8 for Py2 #232 2016-04-21 11:59:18 -03:00
Leandro Toledo
bb36c725af More refactoring and docstrings #232 2016-04-21 09:21:12 -03:00
Leandro Toledo
ba7e1cada7 Bot class refactor and its docstrings #232 2016-04-21 08:15:38 -03:00
Leandro Toledo
9a96ad8efd Unused import #232 2016-04-19 09:12:22 -03:00
Leandro Toledo
fc277d7393 Refactor of telegram.Bot class and docstrings #232 2016-04-19 09:04:25 -03:00
Leandro Toledo
9a340d2ea9 Endorsing if empty or 0 or empty string and minor typo fix #232 2016-04-18 20:18:32 -03:00
Jannes Höke
a98919a86e fix cache_time==0 case 2016-04-19 00:08:47 +02:00
Jannes Höke
d879a0d018 convert reply_markup to json 2016-04-17 22:11:29 +02:00
Jannes Höke
0e5129e59f fix method names and parameters for new methods 2016-04-16 20:57:50 +02:00
Jannes Höke
5e80efaa54 editMessage->editMessageText 2016-04-16 20:29:43 +02:00
Leandro Toledo
85f1b1af0c Adding sendContact and sendVenue methods #232 2016-04-16 11:48:36 -03:00