messenger_client 0.2.2 → 0.2.3

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
  SHA1:
3
- metadata.gz: '048b7dac7bdc602bf58b5e0c747a6272a6d0d340'
4
- data.tar.gz: fcec367428c48d874372df550f73203e78b78113
3
+ metadata.gz: b76a97e55fe0718431fc7e5c678f1babf8791881
4
+ data.tar.gz: 02210ff31706d63ed6eec0dcc4b036ed9c38389a
5
5
  SHA512:
6
- metadata.gz: 3dcb39d188d2c7dfcd77a2374899aff6361dbc353bc10f42e41bc588cfacf8311691dc3ee2ddf23ae5eea725bbd5ff8aa1197816fca9d53cba4a0610e7357bf7
7
- data.tar.gz: 38f2f9cfa2a7520c8079d6d9233dccd9a0d771f35a8318db86afd0215d131bde607ae90bec9c0df891b539ae2f8b3cca92fc496744cbab3ef8e3ad78174fdc3b
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(LARGE COMPACT)
3
+ TEMPLATE_STYLES = %w(large compact)
4
4
 
5
- def initialize(template_items, buttons = [], style = "LARGE")
5
+ def initialize(template_items, buttons = [], style = "large")
6
6
  @template_items = template_items
7
7
  @buttons = buttons
8
- @style = style.upcase
8
+ @style = style.downcase
9
9
  end
10
10
 
11
11
  def type
@@ -1,3 +1,3 @@
1
1
  module MessengerClient
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: messenger_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Cruz