messenger_client 0.2.2 → 0.2.3
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/messenger_client/client.rb +2 -4
- data/lib/messenger_client/list_template.rb +3 -3
- data/lib/messenger_client/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b76a97e55fe0718431fc7e5c678f1babf8791881
|
4
|
+
data.tar.gz: 02210ff31706d63ed6eec0dcc4b036ed9c38389a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e937392ee96de94a0c5cc04927780a1b8458e9fc4543dabbe93c2d7cf840706cf62ff3518255cf1c3e66b67e431a7a486303aa443536eccdb8c7dcde1df114d9
|
7
|
+
data.tar.gz: 4afa46bca2bd30c899cbe4bb02ab0af930b951c4bf92544ddad009024f429851e5e0e73cfca9e18b879ef2819e207f979ce6c922f916df3874420ca67329a5f8
|
@@ -129,12 +129,10 @@ module MessengerClient
|
|
129
129
|
|
130
130
|
def get(url, query = {})
|
131
131
|
res = Typhoeus.get(url, params: { access_token: @page_access_token }.merge(query), headers: headers)
|
132
|
-
if res.success?
|
133
|
-
JSON.load(res.body)
|
134
|
-
else
|
132
|
+
if !res.success?
|
135
133
|
@logger.error("GET Request to #{url} with query #{query.inspect} Failed with #{res.code}")
|
136
|
-
nil
|
137
134
|
end
|
135
|
+
res
|
138
136
|
end
|
139
137
|
|
140
138
|
def delete(url, payload)
|
@@ -1,11 +1,11 @@
|
|
1
1
|
module MessengerClient
|
2
2
|
class ListTemplate < Template
|
3
|
-
TEMPLATE_STYLES = %w(
|
3
|
+
TEMPLATE_STYLES = %w(large compact)
|
4
4
|
|
5
|
-
def initialize(template_items, buttons = [], style = "
|
5
|
+
def initialize(template_items, buttons = [], style = "large")
|
6
6
|
@template_items = template_items
|
7
7
|
@buttons = buttons
|
8
|
-
@style = style.
|
8
|
+
@style = style.downcase
|
9
9
|
end
|
10
10
|
|
11
11
|
def type
|