Class: ChoseInlineResult
- Inherits:
-
Object
- Object
- ChoseInlineResult
- Defined in:
- lib/objects/chosen_inline_result.rb
Overview
Represents a result of an inline query that was chosen by the user
and sent to their chat partner.
Instance Method Summary collapse
-
#from ⇒ Object
The user that chose the result.
-
#initialize(result) ⇒ ChoseInlineResult
constructor
:nodoc:.
-
#inline_message_id ⇒ Object
Optional.
Identifier of the sent inline message. -
#location ⇒ Object
Optional
. -
#query ⇒ Object
The query that was used to obtain the result.
-
#result_id ⇒ Object
The unique identifier for the result that was chosen.
Constructor Details
#initialize(result) ⇒ ChoseInlineResult
:nodoc:
10 11 12 |
# File 'lib/objects/chosen_inline_result.rb', line 10 def initialize(result) # :nodoc: @result = result end |
Instance Method Details
#from ⇒ Object
The user that chose the result.
20 21 22 |
# File 'lib/objects/chosen_inline_result.rb', line 20 def from User.new(@result.from) end |
#inline_message_id ⇒ Object
Optional.
Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message.
35 36 37 |
# File 'lib/objects/chosen_inline_result.rb', line 35 def @result. end |
#location ⇒ Object
Optional
. Sender location, only for bots that require user location.
25 26 27 28 29 30 |
# File 'lib/objects/chosen_inline_result.rb', line 25 def location lcation = @result.location return Location.new(lcation) if lcation false end |
#query ⇒ Object
The query that was used to obtain the result.
40 41 42 |
# File 'lib/objects/chosen_inline_result.rb', line 40 def query @result.query end |
#result_id ⇒ Object
The unique identifier for the result that was chosen.
15 16 17 |
# File 'lib/objects/chosen_inline_result.rb', line 15 def result_id @result.result_id end |