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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4a54e9e5a93a8b848e690c7786b21554d25cdef6f672285e2a932365d8bb93f7
4
- data.tar.gz: 11d6fc2407c6fbde0dbaa14d50ce57da60d1717d11598ed8458356d47da547aa
3
+ metadata.gz: 9aa0df790837aaaed1f43195e040062928fb9054fb229be298432176b84f73f3
4
+ data.tar.gz: 51ba6891f2934f6244e9bc544d2b32eb903bee59325ebdd86b6b5716c7134d2e
5
5
  SHA512:
6
- metadata.gz: '07456808dc44e31e39e1d60fc8cb9d01915fa865720914ac46d82aceb408142aaf5a1e275f9df3264ad12c7952935ee61b04e4860ddfa0e184a4df4e32e6bcd8'
7
- data.tar.gz: f8cdb623cbb272ecdd9e80062f53c5756b647c3eced3a46ea93cf9c8d8c34a54582d81c13fb5daf24dd4ceb01af5bf7f43553f740fc4f84dde66800c1016a812
6
+ metadata.gz: 86ef8ead3bfcca0461a4df5bb4579a1269c255acf55795ef90cc13a985ac7e4a8b07f3ef9b04be4a59b215b59b14f619a136d6e8fa557c09521d0ecf2d094e3d
7
+ data.tar.gz: a186c1f0b7ffb729107c410e016df7377b2dcbe1273fbf437e9dbaab8e54f3bc96ab330f531197f6209b7884f9408ce7e0001d11179b48dc2637da406d34aeb6
@@ -18,5 +18,12 @@ module Kamiflex
18
18
  # }
19
19
  }
20
20
  end
21
+
22
+ def postback_action(data, **params)
23
+ {
24
+ type: "postback",
25
+ data: data
26
+ }.merge(params)
27
+ end
21
28
  end
22
29
  end
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Kamiflex
2
- VERSION = '0.10.0'
2
+ VERSION = '0.11.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kamiflex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - etrex kuo