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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c97e287dce2421a0301dd85e52b4bdfcc265c772
4
- data.tar.gz: 8a40d215ccd885df4b3468f655b9b26b25a10325
3
+ metadata.gz: 6a7fc95a06e596a56ab44ff53b7e523f0297362c
4
+ data.tar.gz: 0ce874a98434cf5fc8a282f6bc9def261adc68b2
5
5
  SHA512:
6
- metadata.gz: bcf6143d6bdfbe2409bb0a2168e8b8f104b6381ce2425ed39bc3157821b81d82475bb0078b09494ae72bfed032ee2a0d8fbd3e9acf4d904178b5d577b5d117a6
7
- data.tar.gz: 5831fee56b3feed4575ea6529e7665dc25412851d4f4159a920a217edbadd8b6b09bdeacfbe0cf805c80c17ae1bbe4e688a872f3b713051d27668ebce7514344
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
- ## Usage
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
- TODO: Write usage instructions here
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
 
@@ -9,7 +9,6 @@ end
9
9
 
10
10
  Smsbroadcast.configure do |config|
11
11
  config.url = "https://api.smsbroadcast.com.au/"
12
- config.from = "getFoodi"
13
12
  config.maxsplit = "1"
14
13
  config.delay = "0"
15
14
  end
@@ -1,3 +1,3 @@
1
1
  module Smsbroadcast
2
- VERSION = "1.1.4"
2
+ VERSION = "1.2.0"
3
3
  end
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.1.4
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: 2016-08-30 00:00:00.000000000 Z
11
+ date: 2018-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday