familyapp_sdk 0.1.1 → 0.1.2
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/.DS_Store +0 -0
- data/Rakefile +4 -0
- data/lib/familyapp_sdk/components/quick_reply.rb +17 -0
- data/lib/familyapp_sdk/message.rb +21 -0
- data/lib/familyapp_sdk/version.rb +1 -1
- data/lib/familyapp_sdk.rb +3 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38fb8c70ef247b276d29c91fa2c033410484dd74
|
4
|
+
data.tar.gz: 405b466cddc2fc15ee2f5264d1ad8d329ccc9a6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1af111e9cd46c64b3dac8447f51b6da626b4bb467ed01de649017f5d5580f485651fec42dd9e2af9d78b37884cb2a399da730644e9b9a9ac8a4a5a123a8a357e
|
7
|
+
data.tar.gz: aaf8c25e269a92ff8590d4679ebffe876403a956fff4312b4678aa6c40d6a70dc1e944c282dc335f0dc5a2406564207db9b6ada77b6f82a47d6ee53e1f78742e
|
data/.DS_Store
CHANGED
Binary file
|
data/Rakefile
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
module FamilyappSdk
|
2
|
+
module Components
|
3
|
+
class QuickReply
|
4
|
+
attr_accessor :title, :payload, :image
|
5
|
+
|
6
|
+
def initialize(title:, payload: nil, image: nil)
|
7
|
+
@title = title
|
8
|
+
@payload = payload
|
9
|
+
@image = image
|
10
|
+
end
|
11
|
+
|
12
|
+
def build
|
13
|
+
instance_values.delete_if { |_attribute, value| value.nil? }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module FamilyappSdk
|
2
|
+
class Message
|
3
|
+
attr_accessor :content, :image, :video, :template, :quick_replies
|
4
|
+
|
5
|
+
def initialize(content: nil, image: nil, video: nil, template: nil, quick_replies: nil)
|
6
|
+
@content = content
|
7
|
+
@image = image
|
8
|
+
@video = video
|
9
|
+
@template = template
|
10
|
+
@quick_replies_attributes = build_quick_replies(quick_replies)
|
11
|
+
end
|
12
|
+
|
13
|
+
def build
|
14
|
+
instance_values.delete_if { |_attribute, value| value.nil? }
|
15
|
+
end
|
16
|
+
|
17
|
+
def build_quick_replies(quick_replies)
|
18
|
+
quick_replies.map { |quick_reply| quick_reply.build } if quick_replies.present?
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/familyapp_sdk.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: familyapp_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Familyapp API Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -105,8 +105,10 @@ files:
|
|
105
105
|
- lib/.DS_Store
|
106
106
|
- lib/familyapp_sdk.rb
|
107
107
|
- lib/familyapp_sdk/client.rb
|
108
|
+
- lib/familyapp_sdk/components/quick_reply.rb
|
108
109
|
- lib/familyapp_sdk/configuration.rb
|
109
110
|
- lib/familyapp_sdk/engine.rb
|
111
|
+
- lib/familyapp_sdk/message.rb
|
110
112
|
- lib/familyapp_sdk/version.rb
|
111
113
|
homepage: http://rubygems.org/gems/familyapp_sdk
|
112
114
|
licenses:
|
@@ -128,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
130
|
version: '0'
|
129
131
|
requirements: []
|
130
132
|
rubyforge_project:
|
131
|
-
rubygems_version: 2.
|
133
|
+
rubygems_version: 2.6.13
|
132
134
|
signing_key:
|
133
135
|
specification_version: 4
|
134
136
|
summary: Familyapp SDK
|