twilio-wrapper 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/twilio-wrapper.rb +5 -6
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
data/lib/twilio-wrapper.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
+
require 'twiliolib'
|
2
|
+
|
1
3
|
class TwilioWrapper
|
2
4
|
API_VERSION = '2010-04-01'
|
3
|
-
attr_reader :account_sid, :account_token, :caller_id, :caller_pin
|
5
|
+
attr_reader :account_sid, :account_token, :caller_id, :caller_pin, :twilio_response
|
4
6
|
|
5
7
|
def initialize(account_sid, account_token, caller_id, caller_pin = nil)
|
6
8
|
@account_sid = account_sid
|
@@ -20,12 +22,9 @@ class TwilioWrapper
|
|
20
22
|
|
21
23
|
resp = @account.request("/#{API_VERSION}/Accounts/#{@account_sid}/SMS/Messages", 'POST', payload)
|
22
24
|
|
23
|
-
send_success =
|
25
|
+
send_success = resp.is_a?(Net::HTTPSuccess)
|
24
26
|
|
25
|
-
|
26
|
-
send_success = false
|
27
|
-
puts resp.body
|
28
|
-
end
|
27
|
+
@twilio_response = resp
|
29
28
|
|
30
29
|
return send_success
|
31
30
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twilio-wrapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Mike Emery
|