smsgh_sms 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/smsgh_sms/version.rb +1 -1
- data/lib/smsgh_sms.rb +11 -11
- 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: 7058946b80752a213b1a63a145fcefe29a4a022a
|
4
|
+
data.tar.gz: 6007ee74997789aa72ac0e4063fcc830845936ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d85fb1b3524910bd34a959095a759cf5bcab9ad9093e068240cf12ade2a0f4fb3c9b31257229868756ee68a510b230e93cbd20b4da1e46f2d2aba42936943865
|
7
|
+
data.tar.gz: c7d087714581deffaba4307cc1f64bf61af04d492823c3007df143c90b590019977639b90fd322bdfcaf2ad71570010734750947ba187a70b9fc53ae5d75834e
|
data/lib/smsgh_sms/version.rb
CHANGED
data/lib/smsgh_sms.rb
CHANGED
@@ -8,11 +8,11 @@ module SmsghSms
|
|
8
8
|
@@api_client_id = nil
|
9
9
|
@@api_client_secret = nil
|
10
10
|
@@api_senderid = "SMSGHAPI"
|
11
|
-
|
11
|
+
|
12
12
|
# Expects :msg, :to and an optional :from param
|
13
13
|
# The :from param defaults to @@api_senderid when its omitted
|
14
14
|
def self.push(options={})
|
15
|
-
|
15
|
+
|
16
16
|
sender_id = options[:from].nil? ? @@api_senderid : options[:from]
|
17
17
|
response = nil
|
18
18
|
|
@@ -24,13 +24,13 @@ module SmsghSms
|
|
24
24
|
|
25
25
|
if @@api_client_id != nil && @@api_client_secret != nil
|
26
26
|
response = CurbFu.get({:host => 'api.smsgh.com', :path => '/v3/messages/send', :protocol => 'https'}, { :From => sender_id, :To => options[:to], :Content => options[:msg], :ClientId => @@api_client_id, :ClientSecret => @@api_client_secret })
|
27
|
-
end
|
28
|
-
|
27
|
+
end
|
28
|
+
|
29
29
|
{:status => response.status, :notice => response.body}
|
30
|
-
|
30
|
+
|
31
31
|
end
|
32
|
-
|
33
|
-
|
32
|
+
|
33
|
+
|
34
34
|
def self.api_username=(api_username); @@api_username = api_username; end
|
35
35
|
def self.api_username; @@api_username; end
|
36
36
|
def self.api_password=(api_password); @@api_password = api_password; end
|
@@ -38,11 +38,11 @@ module SmsghSms
|
|
38
38
|
def self.api_client_id=(api_client_id); @@api_client_id = api_client_id; end
|
39
39
|
def self.api_client_id; @@api_client_id; end
|
40
40
|
def self.api_client_secret=(api_client_secret); @@api_client_secret = api_client_secret; end
|
41
|
-
def self.
|
41
|
+
def self.api_client_secret; @@api_client_secret; end
|
42
42
|
def self.api_senderid=(api_senderid); @@api_senderid = api_senderid; end
|
43
43
|
def self.api_senderid; @@api_senderid; end
|
44
|
-
|
44
|
+
|
45
45
|
endd); @@api_senderid = api_senderid; end
|
46
46
|
def self.api_senderid; @@api_senderid; end
|
47
|
-
|
48
|
-
end
|
47
|
+
|
48
|
+
end
|