line-bot-lite 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 05573f2631ba35fde97b47a5ca9c15060a9b8559
4
- data.tar.gz: e72f0fc487509829246bcbb68ff18c9c089ecdeb
3
+ metadata.gz: 64edfbc80dd87e13e211abd1b332268ecbce2a2c
4
+ data.tar.gz: 60c8f4ecd0c249647bd10a15bf7bc06d76cf32c2
5
5
  SHA512:
6
- metadata.gz: 37f2058edb8705b2a510ca621448b9ac5f15aaed172760769fac604ae121120ce829694249307d38e89424e89483bf60ef1763d80ba045849ff15ccf60cb400b
7
- data.tar.gz: 0e9becc3174b06ff0fbed98f05948c1ee2360fe0b2b448368419c27c70fa8e76af051487b24b4dce3ee6f2fc972eda533cb4d3f49cb048e8e157ff9ba8f02de2
6
+ metadata.gz: 3a8813b28ed1f1dc082c986d2e963dac7b98f3f6ac407fc6e65131463bf3913afc05691297b7715f3bfd56f92ddc02f85598f08781609cd7a98d0a46149b65c1
7
+ data.tar.gz: 3353820adfe020d99b577c53dc837b3aceeca10d53e3be8b8b43853718fe5f01efd1966f54a996a70e7beaadee9487b75825815dc6d9d3713a5b4502235725c0
@@ -2,13 +2,17 @@ module Line
2
2
  module Bot
3
3
  class Event
4
4
 
5
- attr_reader :event_type, :content
5
+ attr_reader :event_type, :content, :id, :from_mid, :to_mid, :from_channel_id, :to_channel_id
6
6
 
7
7
  def initialize(options = {})
8
8
  options.each do |key, value|
9
9
  instance_variable_set("@#{key}", value)
10
10
  end
11
11
 
12
+ @id ||= @data['id']
13
+ @from_mid ||= @data['from']
14
+ @to_mid ||= @data['to']
15
+
12
16
  @content = parse_content
13
17
  end
14
18
 
@@ -27,7 +27,9 @@ module Line
27
27
 
28
28
  Event.new(
29
29
  event_type: type,
30
- data: event_data['content']
30
+ data: event_data['content'],
31
+ from_channel_id: event_data['fromChannel'],
32
+ to_channel_id: event_data['toChannel']
31
33
  )
32
34
  end
33
35
  end
@@ -1,5 +1,5 @@
1
1
  module Line
2
2
  module Bot
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: line-bot-lite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - 蒼時弦也