msg91 0.1.0 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 75de4c742fd77ee6abe1e9738e3df49fe089fdfc
4
- data.tar.gz: b57f6fe208ff4d68ac146d6294af35360bb6fc42
3
+ metadata.gz: 6f45f40a23dfa661ccecc56d74ac560fb24b2f3b
4
+ data.tar.gz: b7a67aaf25173ea69796c46b0b376530a39264c2
5
5
  SHA512:
6
- metadata.gz: 35c41f09d0f16851fa2c52d1d9db14f0a333ef27b005e1289c40da34c0774a8315147120250f3341eabf279135963e8054cf0ba5aea5fd68ccc70afc5e1c1a9b
7
- data.tar.gz: 8c52bf7de3802eb508e6ef706d1c27a3edd1680617e4c6dbe5ea01873ba5581563a07dd3191c88598633102654518f8e257924e29a44e4420a33e1c485f5c9c6
6
+ metadata.gz: d57243f44b45139fcbf4bb831593fa97068b86c5fc057576a52ebe8c5a9fe3a828b5a40df39ba7f8cec49db415435effc1b992773703b071da8e27f7dff71d66
7
+ data.tar.gz: 812935e08634ba22ad6e7b71508921c2b731a6811f8d3189cc95b28c12164bb1384eea20a043349030486e70abed67f88ba758d176968b68459559010392535b
data/README.md CHANGED
@@ -36,6 +36,13 @@ To send a message
36
36
  ```ruby
37
37
  message = Msg91::Message.send_text(sender_id,route,text,recepients,country)
38
38
  ```
39
+ | params | type | description |
40
+ |------------|------------------|----------------------------------------------------------------------|
41
+ | sender_id | string | It contains sender ID |
42
+ | route | string | Route name if you have more than one route available in your account |
43
+ | text | string | It contains the URL encoded message content to send |
44
+ | recepients | array of strings | It contain mobile numbers without country code |
45
+ | country | string | 0 for international, 91 for India, 1 for USA |
39
46
 
40
47
  ## Development
41
48
 
@@ -6,7 +6,7 @@ module Msg91
6
6
  def copy_initializer
7
7
  template "msg91_initializer.rb", "config/initializers/msg91.rb"
8
8
 
9
- puts "Install complete! Truly Outrageous!"
9
+ puts "Install complete! Please visit https://github.com/digiryte/msg91 for documentation"
10
10
  end
11
11
  end
12
12
  end
@@ -3,7 +3,7 @@ require "msg91/configuration"
3
3
  require "msg91/message"
4
4
  require 'uri'
5
5
  require 'net/http'
6
- require 'JSON'
6
+ require 'json'
7
7
 
8
8
  module Msg91
9
9
 
@@ -19,18 +19,4 @@ module Msg91
19
19
  yield(configuration)
20
20
  end
21
21
 
22
- def self.send_text(text,recepients,sender_id='ORANGE',route='4',country='91')
23
- auth_key = Msg91.configuration.auth_key
24
- puts Msg91.configuration
25
- http = Net::HTTP.new('http://api.msg91.com',80)
26
- path = '/api/v2/sendsms'
27
- url = URI("http://api.msg91.com/api/v2/sendsms")
28
- http = Net::HTTP.new(url.host, url.port)
29
- request = Net::HTTP::Post.new(url)
30
- headers = Hash.new
31
- headers = {'authkey' => auth_key,'Content-Type' => 'application/json','unicode' => '1'}
32
- body_string = self.build_hash(sender_id,route,text,recepients,country)
33
- response = http.post(path,body_string,headers)
34
- puts response.read_body
35
- end
36
22
  end
@@ -1,3 +1,3 @@
1
1
  module Msg91
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: msg91
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - digiryte
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-17 00:00:00.000000000 Z
11
+ date: 2018-08-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler