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 +4 -4
- data/lib/line/bot/event.rb +5 -1
- data/lib/line/bot/response.rb +3 -1
- data/lib/line/bot/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64edfbc80dd87e13e211abd1b332268ecbce2a2c
|
4
|
+
data.tar.gz: 60c8f4ecd0c249647bd10a15bf7bc06d76cf32c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a8813b28ed1f1dc082c986d2e963dac7b98f3f6ac407fc6e65131463bf3913afc05691297b7715f3bfd56f92ddc02f85598f08781609cd7a98d0a46149b65c1
|
7
|
+
data.tar.gz: 3353820adfe020d99b577c53dc837b3aceeca10d53e3be8b8b43853718fe5f01efd1966f54a996a70e7beaadee9487b75825815dc6d9d3713a5b4502235725c0
|
data/lib/line/bot/event.rb
CHANGED
@@ -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
|
|
data/lib/line/bot/response.rb
CHANGED
data/lib/line/bot/version.rb
CHANGED