Sha256: d3363c1e505b2544d58499fa1df31befb7f677016533f8b6810ea6b9a11eb7c5
Contents?: true
Size: 675 Bytes
Versions: 3
Compression:
Stored size: 675 Bytes
Contents
# rubocop:disable Metrics/MethodLength module UI ########################### BUTTON TEMPLATE ############################# # https://developers.facebook.com/docs/messenger-platform/send-api-reference/button-template class FBButtonTemplate < UI::BaseUiElement include UI::Common::HasButtons def initialize(text, buttons) @template = { recipient: { id: nil }, message: { attachment: { type: 'template', payload: { template_type: 'button', text: text, buttons: parse_buttons(buttons) } } } } end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rubotnik-0.2.3 | lib/ui/fb_button_template.rb |
rubotnik-0.2.2 | lib/ui/fb_button_template.rb |
rubotnik-0.2.1 | lib/ui/fb_button_template.rb |