mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-21 22:56:38 +01:00
Bootstrapping InputMessageContent classes #232
This commit is contained in:
parent
46ca28f01c
commit
ed170e1595
26 changed files with 140 additions and 4 deletions
|
@ -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')
|
||||
|
|
|
@ -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 <devs@python-telegram-bot.org>
|
||||
# Copyright (C) 2015-2016
|
||||
# Leandro Toledo de Souza <devs@python-telegram-bot.org>
|
||||
#
|
||||
# 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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue