This commit is contained in:
Steve Nian
2018-01-30 20:22:18 +08:00
parent 315242e069
commit c96e5f174c

View File

@@ -270,17 +270,20 @@ class FileAttachment(Attachment):
class AudioAttachment(Attachment):
#: Name of the file
filename = None
#: playable_url
#: Url of the audio file
url = None
#: Duration of the audioclip in milliseconds
duration = None
#: Audio type
audio_type = None
def __init__(self, filename=None, url=None, duration=None, **kwargs):
def __init__(self, filename=None, url=None, duration=None, audio_type=None, **kwargs):
"""Represents an audio file that has been sent as a Facebook attachment"""
super(AudioAttachment, self).__init__(**kwargs)
self.filename = filename
self.url = url
self.duration = duration
self.audio_type = audio_type
class ImageAttachment(Attachment):
#: The extension of the original image (eg. 'png')