messenger_client 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/messenger_client/client.rb +10 -4
- data/lib/messenger_client/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c35746fe9e9f53199eb9ef6fbcb4dff1fcf06254
|
4
|
+
data.tar.gz: 17f6f6861ecb67b2ab4bdc6998b722e9cfc1342c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c2b702d42926113d12f49469ab5127e42921197f06a52b0790385fe3f9079fe9907237f151c61a6c54a6e8744516a22c7e9d4a92cec524dfe5a90fbb858d148
|
7
|
+
data.tar.gz: '088b983e8d0bb4d0fe767ce20611dde12808f0bd9426ef8d5d029c06d78dfae3a707f3c72d0c943ae2df454e4f746e201ce3ac86d128b1a93ec9407c2bd657ab'
|
@@ -72,8 +72,6 @@ module MessengerClient
|
|
72
72
|
def generic_template(recipient_id:, template:)
|
73
73
|
end
|
74
74
|
|
75
|
-
private
|
76
|
-
|
77
75
|
def send(recipient_id, data, opts={})
|
78
76
|
payload = {
|
79
77
|
recipient: {
|
@@ -82,13 +80,21 @@ module MessengerClient
|
|
82
80
|
}
|
83
81
|
payload.merge!(message: data) unless data.nil?
|
84
82
|
payload.merge!(opts)
|
85
|
-
Typhoeus.post(url, body: json(payload), headers: headers)
|
83
|
+
res = Typhoeus.post(url, body: json(payload), headers: headers)
|
84
|
+
p res.body if ENV["DEBUG"]
|
85
|
+
p res.headers if ENV["DEBUG"]
|
86
|
+
res
|
86
87
|
end
|
87
88
|
|
88
89
|
def post(payload)
|
89
|
-
Typhoeus.post(url, body: json(payload), headers: headers)
|
90
|
+
res = Typhoeus.post(url, body: json(payload), headers: headers)
|
91
|
+
p res.body if ENV["DEBUG"]
|
92
|
+
p res.headers if ENV["DEBUG"]
|
93
|
+
res
|
90
94
|
end
|
91
95
|
|
96
|
+
private
|
97
|
+
|
92
98
|
def url
|
93
99
|
URL_TEMPLATE % @page_access_token
|
94
100
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: messenger_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Cruz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
126
|
version: '0'
|
127
127
|
requirements: []
|
128
128
|
rubyforge_project:
|
129
|
-
rubygems_version: 2.
|
129
|
+
rubygems_version: 2.6.8
|
130
130
|
signing_key:
|
131
131
|
specification_version: 4
|
132
132
|
summary: A client for the Facebook Messenger platform
|