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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a5f3cd382e3301e12f50221b2c4dd50fcf9368ec
4
- data.tar.gz: 511638740aa7351650516316f9b0df33d218f2d2
3
+ metadata.gz: 34aed4d7d709d061145c871049c8aa0c824203a6
4
+ data.tar.gz: ad1f29d63e4afe2ff7a90310f1c23d122b0f8fa3
5
5
  SHA512:
6
- metadata.gz: 65c62c21e408228177cc08e11fe16c0f73eb4ede6ae2b5befa31f769fd4261c55507e7a7d784e601ede030b77fa311428bacb572735ba33cdc5c45a68fb984a0
7
- data.tar.gz: f6e2bd4a49937138fbc5fa862c0e2f538499924c77aae5d185dbc7291d3b3e7d0207a8a7c05da5e6bd51331f114968f2b4c399c3c00cf03c0019adee147ed65c
6
+ metadata.gz: df422a9398c0839c53bbc70f2b8546d28acd847a2a702f652d5c5129c76cf14704e41600d2523f19a7ab0a8fd0288cb649a059b45d47e67ca1235cca41981c6f
7
+ data.tar.gz: 63ef43687bc79b79854d98e0ffcc7fa9619775588ad1f22d49d18402c66a4235bc0955ae7a66d9afbc3a0905e8267668992eb68ee72c8d1e1cc849757d7389de
@@ -3,6 +3,7 @@ module Line
3
3
  module API
4
4
  class Error < StandardError; end
5
5
  class InvalidCredentialsError < Error; end
6
+ class NotSupportedError < Error; end
6
7
  end
7
8
  end
8
9
  end
@@ -1,7 +1,7 @@
1
1
  module Line
2
2
  module Bot
3
3
  module API
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.4"
5
5
  end
6
6
  end
7
7
  end
@@ -5,4 +5,5 @@ require 'line/bot/message/video'
5
5
  require 'line/bot/message/audio'
6
6
  require 'line/bot/message/location'
7
7
  require 'line/bot/message/sticker'
8
+ require 'line/bot/message/contact'
8
9
  require 'line/bot/message/recipient_type'
@@ -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.3
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-21 00:00:00.000000000 Z
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