Commit graph

20 commits

Author SHA1 Message Date
Harshil
beb8ba3db0
Doc Fixes (#1874)
* doc fixes

* Update AUTHORS.rst

* More doc fixes

All docs were obtained from official Bot API docs.

* Shortened line length

Did this so it passes codacy check

* Revert id docstring changes

* typo

Co-authored-by: Hinrich Mahler <hinrich.mahler@freenet.de>
2020-04-07 17:25:17 +02:00
Bibo-Joshi
104d0127aa
Doc Fixes (#1778)
* Update docs according to official docs

* Add note to Updater according to #1772

* Add note on ChatPermissions

* Fix rendering for arg type of conversation_timeout
2020-03-28 11:49:47 +01:00
Bibo-Joshi
960c7a0c70
Add default values (#1490)
* added parse_mode parameter in Updater and in Bot class to set a default parse mode for bot

* DefaultValue

* Add default parse_mode everywhere

* Renome to default_parse_mode

* Test def parse_mode for send_*, edit_message_*

* Remove duplicate code in Input* classes

* Improve handling of def_p_m for Bot methods

* Remove unneeded deletion of kwargs

* Make @log preserve signature, add bots with defaults to tests

* Fix Codacy

* Fix Travis Error

* Add default_disable_notification

* Add default_disable_web_page_preview

* Add default_disable_timeout

* add default_disable_web_page_preview for InputTextMessageContent

* add default_quote

* Try fixing test_pin_and_unpin

* Just run 3.5 tests for paranoia

* add tests for Defaults

* Revert "Just run 3.5 tests for paranoia"

This reverts commit 1baa91a3a1.

* Tidy up parameters, move Defaults to ext

* Stage new files, because im an idiot

* remove debug prints

* change equality checks for DEFAULT_NONE

* Some last changes

* fix S&R error so that tests actually run

Co-authored-by: Ak4zh <agwl.akash@gmail.com>
Co-authored-by: Eldinnie <Eldinnie@users.noreply.github.com>
2020-02-06 11:22:56 +01:00
Noam Meltzer
43bfebb150
Update copyright date to 2020 (#1746) 2020-02-02 23:08:54 +02:00
Bibo-Joshi
a397e6c3c6
Doc fixes (#1642)
* Add missing DispatcherHandlerStop to docs

* Forgot to stage new file ...

* update docstring for bot.edit_message_*

* make job callback docs context based

* Flake8

* Fix doc strings of message.reply_

* Update thumb size docs

* Add missing DispatcherHandlerStop to docs

* Forgot to stage new file ...

* update docstring for bot.edit_message_*

* make job callback docs context based

* Flake8

* Fix doc strings of message.reply_

* Update thumb size docs

* Update docs on InlineQuery.query length

* Minor doc updates

* change module to class in to_float_timestamp doc string
2020-02-02 20:20:54 +01:00
Bibo-Joshi
a5ba64becb Remove checks for None on assignement for opt args (#1600) 2019-11-23 18:05:03 +02:00
Eldinnie
ac60d057a5 All api 4.2 and 4.3 changes (#1418) 2019-08-23 22:20:41 +03:00
Jasmin Bom
26ce9bb343
Documentation fixes (#1348)
* Clarify InlineKeyboardButton callback-data docstring

Fixes #1267

* Improve documentation slightly

- Prettier changelog
- Link to examples on frontpage
- Link to wiki on frontpage
- Put telegram.ext in own sidebar thingy

* Improve ext.Filters documentation

Superseeds #1089

- Remove `:obj:Filter` as it's pretty obvious that it's a filter since it's in this module. It also made the html output about 1/3 times longer to scroll through.
- Add an __all__ to reorder so Filter is at the top instead of BaseFilter
- Add a proper docstring for document that documents the attributes (this is the #1089 part)
- Also fix a couple of grammar errors.

* Fix indentation in telegram.rst

* Add `git describe --long --tags` to the `python -m telegram` output

* Use admonition for examples to make them *pop* better

* Remove automodule telegram

Sphinx was whining a lot and it doesn't actually seem to be needed in any way?

* Fix Filters.document docstring per CR

Co-Authored-By: jsmnbom <jsmnbom@gmail.com>

* Fix spelling error in docs index

Co-Authored-By: jsmnbom <jsmnbom@gmail.com>

* Setting needs_sphinx to 1.7.9

so we don't have more issues with incongruent versions

* Fixed last warnings

* Make pre-commit happy
2019-02-18 20:04:52 +01:00
Tanuj
c03160c07f Add convenience classmethods for InlineKeyboardMarkup (fixes #1186) (#1260)
* Add convenience classmethods for InlineKeyboardMarkup (#1186)

* Switch to row and column methods

* Also add convenience classmethods for ReplyKeyboardMarkup

* Add some simple tests
2019-01-04 21:04:45 +01:00
Eldinnie
9d99660ba9 Change MAX_CAPTION_LENGTH to 1024 (#1262)
* update MAX_CAPTION_LENGTH

Telegram silently changed the max length for captions to 1024 chars.

* Update test_constants.py

* change docstrings to reflect new length

* remove message

* clear message and proper match
2018-10-16 19:51:57 +02:00
Eldinnie
4689a80c2e Bot API 4.0 (#1168)
Telegram Passport (#1174):

- Add full support for telegram passport.
    - New types: PassportData, PassportFile, EncryptedPassportElement, EncryptedCredentials, PassportElementError, PassportElementErrorDataField, PassportElementErrorFrontSide, PassportElementErrorReverseSide, PassportElementErrorSelfie, PassportElementErrorFile and PassportElementErrorFiles.
    - New bot method: set_passport_data_errors
    - New filter: Filters.passport_data
    - Field passport_data field on Message
    - PassportData is automagically decrypted when you specify your private key when creating Updater or Bot.
    - PassportFiles is also automagically decrypted as you download/retrieve them.
- See new passportbot.py example for details on how to use, or go to our telegram passport wiki page for more info
- NOTE: Passport decryption requires new dependency `cryptography`.

Inputfile rework (#1184):

- Change how Inputfile is handled internally
- This allows support for specifying the thumbnails of photos and videos using the thumb= argument in the different send_ methods.
- Also allows Bot.send_media_group to actually finally send more than one media.
- Add thumb to Audio, Video and Videonote
- Add Bot.edit_message_media together with InputMediaAnimation, InputMediaAudio, and inputMediaDocument.

Other Bot API 4.0 changes:

- Add forusquare_type to Venue, InlineQueryResultVenue, InputVenueMessageContent, and Bot.send_venue. (#1170)
- Add vCard support by adding vcard field to Contact, InlineQueryResultContact, InputContactMessageContent, and Bot.send_contact. (#1166)
- Support new message entities: CASHTAG and PHONE_NUMBER. (#1179)
    - Cashtag seems to be things like $USD and $GBP, but it seems telegram doesn't currently send them to bots.
    - Phone number also seems to have limited support for now
- Add Bot.send_animation, add width, height, and duration to Animation, and add Filters.animation. (#1172)


Co-authored-by: Jasmin Bom <jsmnbom@gmail.com>
Co-authored-by: code1mountain <32801117+code1mountain@users.noreply.github.com>
Co-authored-by: Eldinnie <pieter.schutz+github@gmail.com>
Co-authored-by: mathefreak1 <mathefreak@hi2.in>
2018-08-29 14:18:58 +02:00
Eldinnie
0bed087542 remove unnecessary to_dict() (#834)
We have some objects that have exactly the same to_dict() method, only specifying that `from_user` should be `from` in the `data`-dict. I refractored this logic to `TelegramObject` and removed those to_dicts() from the code.
2018-02-19 10:31:38 +02:00
Jannik
c152d6583e Support v3.6 API (#1006)
* Added support for new field `telegram.Message.connected_message`

* Added support for new field `telegram.Message.connected_message`

* Added support for parse_mode in captions

* Added parse_mode parameter for captions in InlineQueryResult*

* Added supports_streaming parameter in telegram.Bot.send_video and telegram.InputMediaVideo
Fixed Docstrings for parse_mode in captions

* pypy3.5 unitests are now running with a new version due internal errors on travis.

closes #1005
2018-02-18 17:11:04 +02:00
Jacob Bom
2ca7ff82ef Update headers to 2018 (#962)
Also add two missing headers.
[ci skip]
2018-01-04 17:16:06 +02:00
Eldinnie
bfad2fa1f3 support 3.4 API (#865) 2017-10-14 21:03:02 +03:00
Eldinnie
eae139d3e9 remove de_json() (#789)
* remove de_json()

* Remove or rename obsolete tests

* fixes according to rc
2017-09-01 08:45:22 +02:00
Noam Meltzer
e018445513 Documentation update to PEP (#797) 2017-09-01 08:43:08 +02:00
Eldinnie
b3b94240a5 Docs update (#728)
Amazing new documentation.
2017-07-23 23:33:08 +03:00
Ihor Polyakov
08d298eb60 TelegramObject.de_json became classmethod (#737)
Fixes #734
2017-07-23 22:14:38 +03:00
Jacob Bom
5c2893111a Move a lot of files 2017-06-18 12:35:00 +02:00