line-bot-api 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/line/bot/api/errors.rb +1 -0
- data/lib/line/bot/api/version.rb +1 -1
- data/lib/line/bot/message.rb +1 -0
- data/lib/line/bot/message/contact.rb +18 -0
- data/lib/line/bot/receive/message.rb +5 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34aed4d7d709d061145c871049c8aa0c824203a6
|
4
|
+
data.tar.gz: ad1f29d63e4afe2ff7a90310f1c23d122b0f8fa3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df422a9398c0839c53bbc70f2b8546d28acd847a2a702f652d5c5129c76cf14704e41600d2523f19a7ab0a8fd0288cb649a059b45d47e67ca1235cca41981c6f
|
7
|
+
data.tar.gz: 63ef43687bc79b79854d98e0ffcc7fa9619775588ad1f22d49d18402c66a4235bc0955ae7a66d9afbc3a0905e8267668992eb68ee72c8d1e1cc849757d7389de
|
data/lib/line/bot/api/errors.rb
CHANGED
data/lib/line/bot/api/version.rb
CHANGED
data/lib/line/bot/message.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'line/bot/message/base'
|
2
|
+
|
3
|
+
module Line
|
4
|
+
module Bot
|
5
|
+
module Message
|
6
|
+
class Contact < Line::Bot::Message::Base
|
7
|
+
|
8
|
+
def content
|
9
|
+
raise Line::Bot::API::NotSupportedError
|
10
|
+
end
|
11
|
+
|
12
|
+
def valid?
|
13
|
+
raise Line::Bot::API::NotSupportedError
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -54,6 +54,11 @@ module Line
|
|
54
54
|
stkid: attrs['contentMetadata']['STKID'],
|
55
55
|
stkver: attrs['contentMetadata']['STKVER'],
|
56
56
|
)
|
57
|
+
when Line::Bot::Message::ContentType::CONTACT
|
58
|
+
return Line::Bot::Message::Contact.new(
|
59
|
+
mid: attrs['contentMetadata']['mid'],
|
60
|
+
display_name: attrs['contentMetadata']['displayName'],
|
61
|
+
)
|
57
62
|
else
|
58
63
|
end
|
59
64
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: line-bot-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LINE Corporation
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -115,6 +115,7 @@ files:
|
|
115
115
|
- lib/line/bot/message.rb
|
116
116
|
- lib/line/bot/message/audio.rb
|
117
117
|
- lib/line/bot/message/base.rb
|
118
|
+
- lib/line/bot/message/contact.rb
|
118
119
|
- lib/line/bot/message/content_type.rb
|
119
120
|
- lib/line/bot/message/image.rb
|
120
121
|
- lib/line/bot/message/location.rb
|