Class: Line::Bot::Message::Audio
- Inherits:
-
Base
- Object
- Base
- Line::Bot::Message::Audio
show all
- Defined in:
- lib/line/bot/message/audio.rb
Instance Attribute Summary
Attributes inherited from Base
#attrs, #recipient_type
Instance Method Summary
collapse
Methods inherited from Base
#[], #event_type, #initialize
Instance Method Details
#content ⇒ Object
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/line/bot/message/audio.rb', line 8
def content
{
contentType: ContentType::AUDIO,
toType: recipient_type,
originalContentUrl: attrs[:audio_url],
contentMetadata: {
AUDLEN: attrs[:duration].to_s,
},
}
end
|
#valid? ⇒ Boolean
19
20
21
|
# File 'lib/line/bot/message/audio.rb', line 19
def valid?
attrs[:audio_url] && attrs[:duration]
end
|