sms-club 0.3.3 → 0.3.4
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/README.md +15 -1
- data/lib/sms-club/async.rb +1 -1
- data/lib/sms-club/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: d92127db9deabdafdf2d00bf78045f2915ea2758
|
4
|
+
data.tar.gz: dede7321a178e2846802ef9181adc1a6a43302ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a735436d6ca3dcb3c3914750f5942f4b313519e25b597e2377fe523e4eb98b0ae4adffee056b1ba45ca2b075678bc99d1c2a77ddd4aab39962dfff446bf8f4fa
|
7
|
+
data.tar.gz: 31a609d5f4f08160c9f97b17f13429aac9fbbbe23cf8393e4562408bf518139fd66cfa9cd5aba60014e79822d867acfe51cfd816c7bcd91d68aec16d0d966fe5
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# SmsClub API Client
|
1
|
+
# SmsClub API Client [](http://badge.fury.io/rb/sms-club)
|
2
2
|
|
3
3
|
Client for http://smsclub.mobi/ SMS gate. Allows you to send and retrieve status of sent SMS via XML API.
|
4
4
|
|
@@ -57,6 +57,20 @@ client.statuses_for ['ID_1', 'ID_2']
|
|
57
57
|
|
58
58
|
For more info please see original api docs http://smsclub.mobi/en/pages/show/api#xml
|
59
59
|
|
60
|
+
## Resque
|
61
|
+
|
62
|
+
It also support asynchronous SMS sending with [Resque](https://github.com/resque/resque) gem
|
63
|
+
|
64
|
+
```
|
65
|
+
require 'sms-club/resque'
|
66
|
+
client = SmsClub::AsyncClient.new '380993123123', 'password', from: 'CoolCompany'
|
67
|
+
client.send_async 'async test', to: ['+380664018206', '+380666018203', '+380666018202']
|
68
|
+
```
|
69
|
+
|
70
|
+
When Redis server is not available it automatically switches to synchronous mode.
|
71
|
+
|
72
|
+
Make sure `Resque` is added to your Gemfile.
|
73
|
+
|
60
74
|
## Contributing
|
61
75
|
|
62
76
|
1. Fork it ( https://github.com/pavel-d/sms-club/fork )
|
data/lib/sms-club/async.rb
CHANGED
@@ -17,7 +17,7 @@ module SmsClub
|
|
17
17
|
|
18
18
|
def send_async(message, options = {})
|
19
19
|
begin
|
20
|
-
Resque.enqueue(self, @init_args, message, options)
|
20
|
+
Resque.enqueue(self.class, @init_args, message, options)
|
21
21
|
rescue Redis::CannotConnectError => e
|
22
22
|
warn e
|
23
23
|
warn 'Can not connect to redis server. Falling back to synchronous mode.'
|
data/lib/sms-club/version.rb
CHANGED