Class: Fb::Messenger::Event::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/fb/messenger/events/base.rb

Overview

base event

Direct Known Subclasses

Delivery, Message, Postback

Instance Method Summary collapse

Constructor Details

#initialize(event_data) ⇒ Base

Returns a new instance of Base.



6
7
8
# File 'lib/fb/messenger/events/base.rb', line 6

def initialize(event_data)
  @event_data = event_data
end

Instance Method Details

#recipient_idObject



18
19
20
# File 'lib/fb/messenger/events/base.rb', line 18

def recipient_id
  @event_data[:recipient][:id]
end

#sender_idObject



14
15
16
# File 'lib/fb/messenger/events/base.rb', line 14

def sender_id
  @event_data[:sender][:id]
end

#timestampObject



10
11
12
# File 'lib/fb/messenger/events/base.rb', line 10

def timestamp
  @event_data[:timestamp]
end