Module: Viberroo::Message
- Included in:
- Bot
- Defined in:
- lib/viberroo/message.rb
Instance Method Summary collapse
-
#send_contact(params = {}) ⇒ Object
required params = contact, contact.name, contact.phone_number.
-
#send_file(params = {}) ⇒ Object
required params = media, size, file_name.
-
#send_location(params = {}) ⇒ Object
required params = location.lat, location.lon.
-
#send_message(params = {}) ⇒ Object
required params = text.
-
#send_picture(params = {}) ⇒ Object
required params = text, media.
- #send_rich_media(params = {}) ⇒ Object
-
#send_sticker(params = {}) ⇒ Object
required params = sticker_id viber.github.io/docs/tools/sticker-ids/.
-
#send_url(params = {}) ⇒ Object
required params = media.
-
#send_video(params = {}) ⇒ Object
required params = text, media.
Instance Method Details
#send_contact(params = {}) ⇒ Object
required params = contact, contact.name, contact.phone_number
36 37 38 |
# File 'lib/viberroo/message.rb', line 36 def send_contact(params = {}) dispatch({ type: :contact }.merge(params)) end |
#send_file(params = {}) ⇒ Object
required params = media, size, file_name
31 32 33 |
# File 'lib/viberroo/message.rb', line 31 def send_file(params = {}) dispatch({ type: :file }.merge(params)) end |
#send_location(params = {}) ⇒ Object
required params = location.lat, location.lon
16 17 18 |
# File 'lib/viberroo/message.rb', line 16 def send_location(params = {}) dispatch({ type: :location, min_api_version: 3 }.merge(params)) end |
#send_message(params = {}) ⇒ Object
required params = text
7 8 9 |
# File 'lib/viberroo/message.rb', line 7 def (params = {}) dispatch({ type: :text }.merge(params)) end |
#send_picture(params = {}) ⇒ Object
required params = text, media
21 22 23 |
# File 'lib/viberroo/message.rb', line 21 def send_picture(params = {}) dispatch({ type: :picture }.merge(params)) end |
#send_rich_media(params = {}) ⇒ Object
11 12 13 |
# File 'lib/viberroo/message.rb', line 11 def send_rich_media(params = {}) dispatch({ type: :rich_media, min_api_version: 2 }.merge(params)) end |
#send_sticker(params = {}) ⇒ Object
required params = sticker_id viber.github.io/docs/tools/sticker-ids/
47 48 49 |
# File 'lib/viberroo/message.rb', line 47 def send_sticker(params = {}) dispatch({ type: :sticker }.merge(params)) end |
#send_url(params = {}) ⇒ Object
required params = media
41 42 43 |
# File 'lib/viberroo/message.rb', line 41 def send_url(params = {}) dispatch({ type: :url }.merge(params)) end |
#send_video(params = {}) ⇒ Object
required params = text, media
26 27 28 |
# File 'lib/viberroo/message.rb', line 26 def send_video(params = {}) dispatch({ type: :video }.merge(params)) end |