Class: FlowChat::Config::MessengerConfig
- Inherits:
-
Object
- Object
- FlowChat::Config::MessengerConfig
- Defined in:
- lib/flow_chat/config.rb
Instance Attribute Summary collapse
-
#api_base_url ⇒ Object
Writable for the same reason as WhatsappConfig's, above.
-
#max_button_title ⇒ Object
readonly
Returns the value of attribute max_button_title.
-
#max_buttons_per_element ⇒ Object
readonly
Returns the value of attribute max_buttons_per_element.
-
#max_carousel_elements ⇒ Object
readonly
Returns the value of attribute max_carousel_elements.
-
#max_element_title ⇒ Object
readonly
Returns the value of attribute max_element_title.
-
#max_quick_replies ⇒ Object
readonly
Returns the value of attribute max_quick_replies.
-
#max_quick_reply_title ⇒ Object
readonly
Returns the value of attribute max_quick_reply_title.
-
#max_text_length ⇒ Object
readonly
Returns the value of attribute max_text_length.
Instance Method Summary collapse
-
#initialize ⇒ MessengerConfig
constructor
A new instance of MessengerConfig.
Constructor Details
#initialize ⇒ MessengerConfig
Returns a new instance of MessengerConfig.
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/flow_chat/config.rb', line 156 def initialize @api_base_url = "https://graph.facebook.com/v23.0" # Meta does not state a text limit for Messenger on any current reference # page, unlike Instagram's documented 1,000 bytes. 2000 is the long-cited # figure and is safe to be wrong about in this direction: the client # splits text at this value rather than truncating it, so a limit set too # low sends an extra message and one set too high gets rejected. Raise it # only against a documented figure. @max_text_length = 2000 @max_quick_replies = 13 @max_quick_reply_title = 20 @max_carousel_elements = 10 @max_buttons_per_element = 3 @max_button_title = 20 @max_element_title = 80 end |
Instance Attribute Details
#api_base_url ⇒ Object
Writable for the same reason as WhatsappConfig's, above.
151 152 153 |
# File 'lib/flow_chat/config.rb', line 151 def api_base_url @api_base_url end |
#max_button_title ⇒ Object (readonly)
Returns the value of attribute max_button_title.
152 153 154 |
# File 'lib/flow_chat/config.rb', line 152 def @max_button_title end |
#max_buttons_per_element ⇒ Object (readonly)
Returns the value of attribute max_buttons_per_element.
152 153 154 |
# File 'lib/flow_chat/config.rb', line 152 def @max_buttons_per_element end |
#max_carousel_elements ⇒ Object (readonly)
Returns the value of attribute max_carousel_elements.
152 153 154 |
# File 'lib/flow_chat/config.rb', line 152 def max_carousel_elements @max_carousel_elements end |
#max_element_title ⇒ Object (readonly)
Returns the value of attribute max_element_title.
152 153 154 |
# File 'lib/flow_chat/config.rb', line 152 def max_element_title @max_element_title end |
#max_quick_replies ⇒ Object (readonly)
Returns the value of attribute max_quick_replies.
152 153 154 |
# File 'lib/flow_chat/config.rb', line 152 def max_quick_replies @max_quick_replies end |
#max_quick_reply_title ⇒ Object (readonly)
Returns the value of attribute max_quick_reply_title.
152 153 154 |
# File 'lib/flow_chat/config.rb', line 152 def max_quick_reply_title @max_quick_reply_title end |
#max_text_length ⇒ Object (readonly)
Returns the value of attribute max_text_length.
152 153 154 |
# File 'lib/flow_chat/config.rb', line 152 def max_text_length @max_text_length end |