class Viberroo::Input
This class' methods serve as declarative wrappers with predefined types for UI elements such as buttons and keyboards. Buttons can be combined with a keyboard or used in rich messages. Only basic parameters are specified in this documentation, to see all possibilities please consult official Viber API documentation.
@see viber.github.io/docs/tools/keyboards/#general-keyboard-parameters @see viber.github.io/docs/tools/keyboards/#buttons-parameters
Public Class Methods
keyboard(params)
click to toggle source
A keyboard that can be attached to any message.
@example
go_somewhere = Viberroo::Input.url_button({ Columns: 3, Rows: 2, Text: 'Mystery link', ActionBody: 'somewhere.com' }) keyboard = Input.keyboard(Buttons: [go_somewhere])
@see developers.viber.com/docs/tools/keyboards/#general-keyboard-parameters
# File lib/viberroo/input.rb, line 28 def self.keyboard(params) { keyboard: { Type: 'keyboard' }.merge(params) } end