smsbroadcast 1.1.4 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +47 -6
- data/lib/smsbroadcast.rb +0 -1
- data/lib/smsbroadcast/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a7fc95a06e596a56ab44ff53b7e523f0297362c
|
4
|
+
data.tar.gz: 0ce874a98434cf5fc8a282f6bc9def261adc68b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e29a515633110d1c4de90b3c24052059888cf14d8e907b856f3a5e47482c8d8eb842d11f56781b33ecb34da1c6002307ebfa3de4b736b4c70d23d6d6629660a3
|
7
|
+
data.tar.gz: 6b0c7b0b72e20a73720969d97d448a92c7941f93ec24d438b42f5dd452c3669a98404f4f782e987d187946fcbbe354f9811c9468992c261eda2dee8ce0662dcf
|
data/README.md
CHANGED
@@ -1,8 +1,5 @@
|
|
1
1
|
# Smsbroadcast
|
2
|
-
|
3
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/smsbroadcast`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
2
|
+
Convenience wrapper for sending sms messages using www.smsbroadcast.com.au
|
6
3
|
|
7
4
|
## Installation
|
8
5
|
|
@@ -20,9 +17,53 @@ Or install it yourself as:
|
|
20
17
|
|
21
18
|
$ gem install smsbroadcast
|
22
19
|
|
23
|
-
##
|
20
|
+
## Configuration
|
21
|
+
Put the following in an initializer or somewhere in your initialization flow.
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
Smsbroadcast.configure do |config|
|
25
|
+
config.from = "some company"
|
26
|
+
config.username = ENV['SMSBROADCAST_USERNAME']
|
27
|
+
config.password = ENV['SMSBROADCAST_PASSWORD]
|
28
|
+
|
29
|
+
# OPTIONAL BELOW
|
30
|
+
config.url = "https://api.smsbroadcast.com.au/"
|
31
|
+
config.maxsplit = "1"
|
32
|
+
config.delay = "0"
|
33
|
+
end
|
34
|
+
```
|
35
|
+
|
36
|
+
## Send an SMS
|
24
37
|
|
25
|
-
|
38
|
+
```ruby
|
39
|
+
sms = Smsbroadcast::Sms.new({
|
40
|
+
to: '0499999999', # or ['0499999999', '0411111111'] up to 1000 numbers
|
41
|
+
message: 'some message text',
|
42
|
+
|
43
|
+
# OPTIONAL BELOW
|
44
|
+
from: 'some company',
|
45
|
+
maxsplit: '1',
|
46
|
+
delay: '0'
|
47
|
+
})
|
48
|
+
|
49
|
+
response = sms.deliver
|
50
|
+
|
51
|
+
response.status #=> 'some status that smsbroadcast supports'
|
52
|
+
response.number #=> 'the number'
|
53
|
+
response.ref #=> 'the reference'
|
54
|
+
response.message #=> 'the message
|
55
|
+
```
|
56
|
+
|
57
|
+
## Get Account Status
|
58
|
+
Can't remember if this works. It's a bit weird, probably was meant to be like status = Smsbroadcast::GetStatus.call() or somesuch.
|
59
|
+
|
60
|
+
```ruby
|
61
|
+
status = Smsbroadcast::Status.new
|
62
|
+
status.call()
|
63
|
+
status.status #=> some status stuff
|
64
|
+
status.balance #=> your balance as a string? i don't remember
|
65
|
+
status.message #=> some sort of lovely message from the team at smsbroadcast?
|
66
|
+
```
|
26
67
|
|
27
68
|
## Development
|
28
69
|
|
data/lib/smsbroadcast.rb
CHANGED
data/lib/smsbroadcast/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smsbroadcast
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sia.s.saj
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|