kamiflex 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kamiflex/actions.rb +7 -0
- data/lib/kamiflex/basic_elements.rb +23 -0
- data/lib/kamiflex/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9aa0df790837aaaed1f43195e040062928fb9054fb229be298432176b84f73f3
|
4
|
+
data.tar.gz: 51ba6891f2934f6244e9bc544d2b32eb903bee59325ebdd86b6b5716c7134d2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86ef8ead3bfcca0461a4df5bb4579a1269c255acf55795ef90cc13a985ac7e4a8b07f3ef9b04be4a59b215b59b14f619a136d6e8fa557c09521d0ecf2d094e3d
|
7
|
+
data.tar.gz: a186c1f0b7ffb729107c410e016df7377b2dcbe1273fbf437e9dbaab8e54f3bc96ab330f531197f6209b7884f9408ce7e0001d11179b48dc2637da406d34aeb6
|
data/lib/kamiflex/actions.rb
CHANGED
@@ -63,5 +63,28 @@ module Kamiflex
|
|
63
63
|
}
|
64
64
|
}.merge(params)
|
65
65
|
end
|
66
|
+
|
67
|
+
def postback_button(label, data, **params)
|
68
|
+
@flex_contents << {
|
69
|
+
"type": "button",
|
70
|
+
"action": {
|
71
|
+
"type": "postback",
|
72
|
+
"label": label,
|
73
|
+
"data": data,
|
74
|
+
}
|
75
|
+
}.merge(params)
|
76
|
+
end
|
77
|
+
|
78
|
+
def postback_text_button(label, message, data, **params)
|
79
|
+
@flex_contents << {
|
80
|
+
"type": "button",
|
81
|
+
"action": {
|
82
|
+
"type": "postback",
|
83
|
+
"label": label,
|
84
|
+
"displayText": message,
|
85
|
+
"data": data,
|
86
|
+
}
|
87
|
+
}.merge(params)
|
88
|
+
end
|
66
89
|
end
|
67
90
|
end
|
data/lib/kamiflex/version.rb
CHANGED