diff --git a/telegram/__init__.py b/telegram/__init__.py index f0ad4bf0b..4a2f93006 100644 --- a/telegram/__init__.py +++ b/telegram/__init__.py @@ -65,6 +65,11 @@ from .inlinequeryresultphoto import InlineQueryResultPhoto from .inlinequeryresultvenue import InlineQueryResultVenue from .inlinequeryresultvideo import InlineQueryResultVideo from .inlinequeryresultvoice import InlineQueryResultVoice +from .inputmessagecontent import InputMessageContent +from .inputtextmessagecontent import InputTextMessageContent +from .inputlocationmessagecontent import InputLocationMessageContent +from .inputvenuemessagecontent import InputVenueMessageContent +from .inputcontactmessagecontent import InputContactMessageContent from .update import Update from .bot import Bot @@ -119,4 +124,7 @@ __all__ = ('Audio', 'Bot', 'Chat', 'Emoji', 'TelegramError', 'InputFile', 'InlineQueryResultDocument', 'InlineQueryResultGif', 'InlineQueryResultLocation', 'InlineQueryResultMpeg4Gif', 'InlineQueryResultPhoto', 'InlineQueryResultVenue', - 'InlineQueryResultVideo', 'InlineQueryResultVoice') + 'InlineQueryResultVideo', 'InlineQueryResultVoice', + 'InputMessageContent', 'InputTextMessageContent', + 'InputLocationMessageContent', 'InputVenueMessageContent', + 'InputContactMessageContent') diff --git a/telegram/inlinequeryresult.py b/telegram/inlinequeryresult.py index 7434ed0e1..58d1264b4 100644 --- a/telegram/inlinequeryresult.py +++ b/telegram/inlinequeryresult.py @@ -1,7 +1,8 @@ #!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API -# Copyright (C) 2015 Leandro Toledo de Souza +# Copyright (C) 2015-2016 +# Leandro Toledo de Souza # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by @@ -17,7 +18,7 @@ # along with this program. If not, see [http://www.gnu.org/licenses/]. """This module contains the classes that represent Telegram -InlineQueryResults""" +InlineQueryResult""" from telegram import TelegramObject diff --git a/telegram/inlinequeryresultarticle.py b/telegram/inlinequeryresultarticle.py index 89389700b..32fa276b0 100644 --- a/telegram/inlinequeryresultarticle.py +++ b/telegram/inlinequeryresultarticle.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the classes that represent Telegram +InlineQueryResultArticle""" + from telegram import InlineQueryResult from telegram.utils.validate import validate_string diff --git a/telegram/inlinequeryresultaudio.py b/telegram/inlinequeryresultaudio.py index 665281ba7..93ffe2358 100644 --- a/telegram/inlinequeryresultaudio.py +++ b/telegram/inlinequeryresultaudio.py @@ -17,9 +17,33 @@ # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the classes that represent Telegram +InlineQueryResultAudio""" + from telegram import InlineQueryResult from telegram.utils.validate import validate_string class InlineQueryResultAudio(InlineQueryResult): - pass + + def __init__(self, + id, + audio_url, + title, + performer=None, + audio_duration=None, + reply_markup=None, + input_message_content=None): + + # Required + super(InlineQueryResultAudio, self).__init__('audio', id) + self.audio_url = audio_url + self.title = title + + # Optional + self.performer = performer + self.audio_duration = audio_duration + if reply_markup is not None: + self.reply_markup = 'ReplyMarkup' # TODO + if input_message_content is not None: + self.input_message_content = 'InputMessageContent' diff --git a/telegram/inlinequeryresultcachedaudio.py b/telegram/inlinequeryresultcachedaudio.py index 319ff5ea0..8d368185b 100644 --- a/telegram/inlinequeryresultcachedaudio.py +++ b/telegram/inlinequeryresultcachedaudio.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the classes that represent Telegram +InlineQueryResultCachedAudio""" + from telegram import InlineQueryResult from telegram.utils.validate import validate_string diff --git a/telegram/inlinequeryresultcacheddocument.py b/telegram/inlinequeryresultcacheddocument.py index 4e84e57d6..b3d529a2d 100644 --- a/telegram/inlinequeryresultcacheddocument.py +++ b/telegram/inlinequeryresultcacheddocument.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the classes that represent Telegram +InlineQueryResultCachedDocument""" + from telegram import InlineQueryResult from telegram.utils.validate import validate_string diff --git a/telegram/inlinequeryresultcachedgif.py b/telegram/inlinequeryresultcachedgif.py index 3a019d577..42ead2395 100644 --- a/telegram/inlinequeryresultcachedgif.py +++ b/telegram/inlinequeryresultcachedgif.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the classes that represent Telegram +InlineQueryResultCachedGif""" + from telegram import InlineQueryResult from telegram.utils.validate import validate_string diff --git a/telegram/inlinequeryresultcachedmpeg4gif.py b/telegram/inlinequeryresultcachedmpeg4gif.py index 4577a4319..2fcec2613 100644 --- a/telegram/inlinequeryresultcachedmpeg4gif.py +++ b/telegram/inlinequeryresultcachedmpeg4gif.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the classes that represent Telegram +InlineQueryResultMpeg4Gif""" + from telegram import InlineQueryResult from telegram.utils.validate import validate_string diff --git a/telegram/inlinequeryresultcachedphoto.py b/telegram/inlinequeryresultcachedphoto.py index b4db93ab5..de1a241e0 100644 --- a/telegram/inlinequeryresultcachedphoto.py +++ b/telegram/inlinequeryresultcachedphoto.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the classes that represent Telegram +InlineQueryResultPhoto""" + from telegram import InlineQueryResult from telegram.utils.validate import validate_string diff --git a/telegram/inlinequeryresultcachedsticker.py b/telegram/inlinequeryresultcachedsticker.py index f45b43068..ade150dc4 100644 --- a/telegram/inlinequeryresultcachedsticker.py +++ b/telegram/inlinequeryresultcachedsticker.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the classes that represent Telegram +InlineQueryResultCachedSticker""" + from telegram import InlineQueryResult from telegram.utils.validate import validate_string diff --git a/telegram/inlinequeryresultcachedvideo.py b/telegram/inlinequeryresultcachedvideo.py index 3d4ba192d..2bae63f86 100644 --- a/telegram/inlinequeryresultcachedvideo.py +++ b/telegram/inlinequeryresultcachedvideo.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the classes that represent Telegram +InlineQueryResultCachedVideo""" + from telegram import InlineQueryResult from telegram.utils.validate import validate_string diff --git a/telegram/inlinequeryresultcachedvoice.py b/telegram/inlinequeryresultcachedvoice.py index 648c9ce23..ccf423e07 100644 --- a/telegram/inlinequeryresultcachedvoice.py +++ b/telegram/inlinequeryresultcachedvoice.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the classes that represent Telegram +InlineQueryResultCachedVoice""" + from telegram import InlineQueryResult from telegram.utils.validate import validate_string diff --git a/telegram/inlinequeryresultcontact.py b/telegram/inlinequeryresultcontact.py index 1c195b56c..47e763f84 100644 --- a/telegram/inlinequeryresultcontact.py +++ b/telegram/inlinequeryresultcontact.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the classes that represent Telegram +InlineQueryResultContact""" + from telegram import InlineQueryResult from telegram.utils.validate import validate_string diff --git a/telegram/inlinequeryresultdocument.py b/telegram/inlinequeryresultdocument.py index 30de8a40d..864bb732e 100644 --- a/telegram/inlinequeryresultdocument.py +++ b/telegram/inlinequeryresultdocument.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the classes that represent Telegram +InlineQueryResultDocument""" + from telegram import InlineQueryResult from telegram.utils.validate import validate_string diff --git a/telegram/inlinequeryresultgif.py b/telegram/inlinequeryresultgif.py index cd7b2beec..c14b0b42c 100644 --- a/telegram/inlinequeryresultgif.py +++ b/telegram/inlinequeryresultgif.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the classes that represent Telegram +InlineQueryResultGif""" + from telegram import InlineQueryResult from telegram.utils.validate import validate_string diff --git a/telegram/inlinequeryresultlocation.py b/telegram/inlinequeryresultlocation.py index 78e8dffb7..e3610351a 100644 --- a/telegram/inlinequeryresultlocation.py +++ b/telegram/inlinequeryresultlocation.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the classes that represent Telegram +InlineQueryResultLocation""" + from telegram import InlineQueryResult from telegram.utils.validate import validate_string diff --git a/telegram/inlinequeryresultmpeg4gif.py b/telegram/inlinequeryresultmpeg4gif.py index b3c4071e8..c130b6c2d 100644 --- a/telegram/inlinequeryresultmpeg4gif.py +++ b/telegram/inlinequeryresultmpeg4gif.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the classes that represent Telegram +InlineQueryResultMpeg4Gif""" + from telegram import InlineQueryResult from telegram.utils.validate import validate_string diff --git a/telegram/inlinequeryresultphoto.py b/telegram/inlinequeryresultphoto.py index 80eec6163..ced2dbb2e 100644 --- a/telegram/inlinequeryresultphoto.py +++ b/telegram/inlinequeryresultphoto.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the classes that represent Telegram +InlineQueryResultPhoto""" + from telegram import InlineQueryResult from telegram.utils.validate import validate_string diff --git a/telegram/inlinequeryresultvenue.py b/telegram/inlinequeryresultvenue.py index bf9d1510a..53b6b7bd0 100644 --- a/telegram/inlinequeryresultvenue.py +++ b/telegram/inlinequeryresultvenue.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the classes that represent Telegram +InlineQueryResultVenue""" + from telegram import InlineQueryResult from telegram.utils.validate import validate_string diff --git a/telegram/inlinequeryresultvideo.py b/telegram/inlinequeryresultvideo.py index 9f1175695..e6170b4e0 100644 --- a/telegram/inlinequeryresultvideo.py +++ b/telegram/inlinequeryresultvideo.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the classes that represent Telegram +InlineQueryResultVideo""" + from telegram import InlineQueryResult from telegram.utils.validate import validate_string diff --git a/telegram/inlinequeryresultvoice.py b/telegram/inlinequeryresultvoice.py index 1757c740b..1d6f81214 100644 --- a/telegram/inlinequeryresultvoice.py +++ b/telegram/inlinequeryresultvoice.py @@ -17,6 +17,9 @@ # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. +"""This module contains the classes that represent Telegram +InlineQueryResultVoice""" + from telegram import InlineQueryResult from telegram.utils.validate import validate_string diff --git a/telegram/inputcontactmessagecontent.py b/telegram/inputcontactmessagecontent.py index 3d29ea07b..2fc052f1f 100644 --- a/telegram/inputcontactmessagecontent.py +++ b/telegram/inputcontactmessagecontent.py @@ -16,3 +16,12 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. + +"""This module contains the classes that represent Telegram +InputContactMessageContent""" + +from telegram import InputMessageContent + + +class InputContactMessageContent(InputMessageContent): + pass diff --git a/telegram/inputlocationmessagecontent.py b/telegram/inputlocationmessagecontent.py index 3d29ea07b..5d19fc31c 100644 --- a/telegram/inputlocationmessagecontent.py +++ b/telegram/inputlocationmessagecontent.py @@ -16,3 +16,12 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. + +"""This module contains the classes that represent Telegram +InputLocationMessageContent""" + +from telegram import InputMessageContent + + +class InputLocationMessageContent(InputMessageContent): + pass diff --git a/telegram/inputmessagecontent.py b/telegram/inputmessagecontent.py index 3d29ea07b..8cad33f50 100644 --- a/telegram/inputmessagecontent.py +++ b/telegram/inputmessagecontent.py @@ -16,3 +16,16 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. + +"""This module contains the classes that represent Telegram +InputMessageContent""" + +from telegram import TelegramObject + + +class InputMessageContent(TelegramObject): + """Base class for Telegram InputMessageContent Objects""" + + @staticmethod + def de_json(data): + pass diff --git a/telegram/inputtextmessagecontent.py b/telegram/inputtextmessagecontent.py index 3d29ea07b..79eb72f9c 100644 --- a/telegram/inputtextmessagecontent.py +++ b/telegram/inputtextmessagecontent.py @@ -16,3 +16,12 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. + +"""This module contains the classes that represent Telegram +InputTextMessageContent""" + +from telegram import InputMessageContent + + +class InputTextMessageContent(InputMessageContent): + pass diff --git a/telegram/inputvenuemessagecontent.py b/telegram/inputvenuemessagecontent.py index 3d29ea07b..0d1da602d 100644 --- a/telegram/inputvenuemessagecontent.py +++ b/telegram/inputvenuemessagecontent.py @@ -16,3 +16,12 @@ # # You should have received a copy of the GNU Lesser Public License # along with this program. If not, see [http://www.gnu.org/licenses/]. + +"""This module contains the classes that represent Telegram +InputVenueMessageContent""" + +from telegram import InputMessageContent + + +class InputVenueMessageContent(InputMessageContent): + pass