Class: GrubY::CallbackQuery

Inherits:
BaseObject show all
Defined in:
lib/gruubY/types/bound_entities.rb

Instance Attribute Summary

Attributes inherited from BaseObject

#api, #client

Instance Method Summary collapse

Methods inherited from BaseObject

#[], #dig, field_names, fields, #initialize, #method_missing, #respond_to_missing?, #to_h

Constructor Details

This class inherits a constructor from GrubY::BaseObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class GrubY::BaseObject

Instance Method Details

#answer(text = nil, show_alert: false, **opts) ⇒ Object



7
8
9
# File 'lib/gruubY/types/bound_entities.rb', line 7

def answer(text = nil, show_alert: false, **opts)
  call_api("answerCallbackQuery", { callback_query_id: id, text: text, show_alert: show_alert }.merge(opts))
end

#edit_message_caption(caption, **opts) ⇒ Object



15
16
17
# File 'lib/gruubY/types/bound_entities.rb', line 15

def edit_message_caption(caption, **opts)
  edit_payload("editMessageCaption", { caption: caption }.merge(opts))
end

#edit_message_media(media, **opts) ⇒ Object



19
20
21
# File 'lib/gruubY/types/bound_entities.rb', line 19

def edit_message_media(media, **opts)
  edit_payload("editMessageMedia", { media: media }.merge(opts))
end

#edit_message_reply_markup(reply_markup = nil, **opts) ⇒ Object



23
24
25
# File 'lib/gruubY/types/bound_entities.rb', line 23

def edit_message_reply_markup(reply_markup = nil, **opts)
  edit_payload("editMessageReplyMarkup", { reply_markup: reply_markup }.merge(opts))
end

#edit_message_text(text, **opts) ⇒ Object



11
12
13
# File 'lib/gruubY/types/bound_entities.rb', line 11

def edit_message_text(text, **opts)
  edit_payload("editMessageText", { text: text }.merge(opts))
end