sendout 0.1.2 → 0.1.3

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: 53871501ea9a92d9202cf55df14e719aac21382f
4
- data.tar.gz: f2d3ae3d009274fd1b53c481a2db7d89d3ef6a2b
3
+ metadata.gz: b942cb5181754d28879f979624d093078c116323
4
+ data.tar.gz: 09be7f4eaacdd24a507e727284cf0082342e9a69
5
5
  SHA512:
6
- metadata.gz: ae0443db633e8a1d4703027b4db0dd560b049a3ccd3e5b2638d0c4a9766583cf98e71467eea9403e872cf9526ba1172cf784ad3160fa12a27647b1761986aa91
7
- data.tar.gz: 733bc007fb7a63dda1d04eed631100818515cef8170fad6b3b55d175fe822802046722b9d38343da41ab6a4c39eda3924d17092c30af0c452ddb831ea9ffa3db
6
+ metadata.gz: 2797a0fb0e09fea41df47268fcbb33e7a43e0a7cfbb946b5a331e6f9d895e5e71078fdb7cb7c6d67dda676fcd87ff81f830def1aedc26c2e8eb34646fc0a9117
7
+ data.tar.gz: 798645276c433566df88625c2c4b21e1283242ee79bbd29fcd6b3bae1482db6b809741d86ae4485aa716d73834a33c03976b7d0f595cdf546cb2cacc61ce3ca0
data/README.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  A ruby gem createb by [SmartTechys](http://www.smarttechys.co.ao) for the [SendOut](https://www.sendoutapp.com) API that allows your application to send text messages (Angolan and International).
4
4
 
5
+ ## ATTENTION
6
+ * **API Version 1 - Gem sendout v0.1.1**
7
+ * **API Version 2 - Gem sendout v0.1.2**
8
+
5
9
  ## Installation
6
10
 
7
11
  Add this line to your application's Gemfile:
@@ -41,25 +45,52 @@ Sendout.check_balance
41
45
 
42
46
  # It will return a json
43
47
 
44
- {
45
- "cliente": {
46
- "saldo": "512"
47
- "enviada": "203"
48
- }
48
+ {
49
+ "cliente": "2449XXXXXXXX"
50
+ "saldo": "512"
51
+ "enviadas": "203"
52
+ "contactos": "2"
53
+ "campanhas": "1"
49
54
  }
50
55
  ```
51
56
 
52
- ### Send one or bulk message
57
+ ### Send one or bulk message - Production Environment
53
58
 
54
59
  ```ruby
55
60
  Sendout.send_sms(num, msg)
56
61
 
57
- # The num has to be an array and the msg an string. This method will return a boolean
62
+ # The num has to be an array and the msg an string. This method will return an array of one or more JSON objects.
63
+ ```
64
+ Response:
65
+ ```JSON
66
+ [
67
+ {
68
+ "id":"0800000018E1C4DA",
69
+ "de":"2449XXXXXXX5",
70
+ "para":"2449XXXXXXX0",
71
+ "remetente":"SENDOUT",
72
+ "caracteres":"24",
73
+ "quantidade":"1",
74
+ "data":"07-01-2017 18:59:37",
75
+ "rede":"00000",
76
+ "enviado":true,
77
+ "estado":"Entregue"
78
+ }
79
+ ]
58
80
  ```
81
+ ### Send one or bulk message - Test Environment
82
+ You need to add a boolean value true to send as test; if nothing or false will send it to production
83
+
84
+ ```ruby
85
+ Sendout.send_sms(num, true, msg)
86
+
87
+ # The num has to be an array and the msg an string. This method will return an array of one or more JSON objects
88
+ ```
89
+
59
90
  ## Help and Docs
60
91
 
61
92
  - [SendOut](https://www.sendoutapp.com)
62
- - [RDoc](https://www.rubydoc.info/gems/0.1.0)
93
+ - [RDoc](https://www.rubydoc.info/gems/0.1.2)
63
94
 
64
95
  ## Development
65
96
 
@@ -10,11 +10,15 @@ module Sendout
10
10
  def self.check_balance
11
11
  post("/saldo", {:body => authenticate.to_json, :headers => {'Content-Type' => 'application/json'}}).parsed_response
12
12
  end
13
-
13
+
14
14
  # send sms: dest is always an array of numbers and the message a string
15
15
  def self.send_sms(numbers=[], debug={}, message)
16
16
  # fields from API
17
- data = {"para" => numbers, "sms" => message, "debug" => debug}
17
+ if debug == false
18
+ data = {"para" => numbers, "sms" => message}
19
+ else
20
+ data = {"para" => numbers, "sms" => message, "debug" => debug}
21
+ end
18
22
 
19
23
  # merge the body content
20
24
  content = {}
@@ -1,3 +1,3 @@
1
1
  module Sendout
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sendout
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergio Maziano
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-09 00:00:00.000000000 Z
11
+ date: 2017-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -82,7 +82,6 @@ files:
82
82
  - Rakefile
83
83
  - bin/console
84
84
  - bin/setup
85
- - lib/.sendout.rb.swp
86
85
  - lib/sendout.rb
87
86
  - lib/sendout/version.rb
88
87
  - sendout.gemspec
@@ -106,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
105
  version: '0'
107
106
  requirements: []
108
107
  rubyforge_project:
109
- rubygems_version: 2.6.8
108
+ rubygems_version: 2.6.7
110
109
  signing_key:
111
110
  specification_version: 4
112
111
  summary: A Ruby gem for SendOut API(https://www.sendoutapp.com) made by SmartTechys(http://smarttechys.co.ao).
Binary file