From ea8bf3b24d4b56a588ee466744c2eb0ae1eb3eb7 Mon Sep 17 00:00:00 2001 From: Msg91 Date: Sat, 6 Sep 2014 16:14:31 +0530 Subject: [PATCH 1/4] Send via Diff Diff route User can change route. --- lib/msg91ruby/api.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/msg91ruby/api.rb b/lib/msg91ruby/api.rb index c6bf013..f2cfb15 100644 --- a/lib/msg91ruby/api.rb +++ b/lib/msg91ruby/api.rb @@ -8,9 +8,9 @@ def initialize(auth_key, senderid) @url = URL end - def send(mobilenos,msg) + def send(mobilenos,msg,route) mobile_nos = mobilenos.is_a?(Array) ? mobilenos.join(',') : mobilenos - params = {:authkey => auth_key, :mobiles => mobile_nos, :message => msg , :sender => senderid ,:route => 1, :response => "json"} + params = {:authkey => auth_key, :mobiles => mobile_nos, :message => msg , :sender => senderid ,:route => route, :response => "json"} uri = full_path('/api/sendhttp.php', params) response = Net::HTTP.get(uri) end From f123e0fdd5c81cab543100e50de4c3e52359bc45 Mon Sep 17 00:00:00 2001 From: Msg91 Date: Sat, 6 Sep 2014 16:19:56 +0530 Subject: [PATCH 2/4] Update api.rb --- lib/msg91ruby/api.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/msg91ruby/api.rb b/lib/msg91ruby/api.rb index f2cfb15..1503c45 100644 --- a/lib/msg91ruby/api.rb +++ b/lib/msg91ruby/api.rb @@ -8,7 +8,7 @@ def initialize(auth_key, senderid) @url = URL end - def send(mobilenos,msg,route) + def send(mobilenos,msg,route = 1) mobile_nos = mobilenos.is_a?(Array) ? mobilenos.join(',') : mobilenos params = {:authkey => auth_key, :mobiles => mobile_nos, :message => msg , :sender => senderid ,:route => route, :response => "json"} uri = full_path('/api/sendhttp.php', params) From 8a0fe33e092b399921cc2a57204c6ea5fcc48251 Mon Sep 17 00:00:00 2001 From: Msg91 Date: Sat, 6 Sep 2014 16:23:32 +0530 Subject: [PATCH 3/4] Example updated. Send sms using diff-diff route. --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 38c009f..4170373 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,11 @@ eg: api = Msg91ruby::API.new("2552515255255255252","113388") api.send(1234567890, "Test Message") api.send([1234567890,9012345678], "Test Message") + +Sending SMS using other route: + api.send(1234567890, "Test Message",1) + api.send(1234567890, "Test Message",4) + ## SMS Settings From d1dc8621de54799598a513e713a8bf0a23a41939 Mon Sep 17 00:00:00 2001 From: Msg91 Date: Sat, 6 Sep 2014 16:34:41 +0530 Subject: [PATCH 4/4] Update and rename msg91ruby.gemspec to msg91.gemspec --- msg91ruby.gemspec => msg91.gemspec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename msg91ruby.gemspec => msg91.gemspec (79%) diff --git a/msg91ruby.gemspec b/msg91.gemspec similarity index 79% rename from msg91ruby.gemspec rename to msg91.gemspec index a68fe36..f5475bd 100644 --- a/msg91ruby.gemspec +++ b/msg91.gemspec @@ -4,13 +4,13 @@ $:.unshift(lib) unless $:.include?(lib) require 'msg91ruby/version' Gem::Specification.new do |spec| - spec.name = "msg91ruby" + spec.name = "msg91" spec.version = Msg91ruby::VERSION - spec.authors = ["rajesh"] - spec.email = ["rajeshnecg@gmail.com"] + spec.authors = ["Rahul"] + spec.email = ["rahul@hostnsoft.com"] spec.summary = %q{A Ruby gem to connect with Msg91 Api to send messages} spec.description = %q{Connects to Msg91 api to send messages} - spec.homepage = "https://github.com/deeproot/msg91ruby" + spec.homepage = "https://github.com/deeproot/msg91" spec.license = "MIT" spec.files = `git ls-files -z`.split("\x0")