gupshup 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/gupshup.rb +6 -1
  2. metadata +3 -3
data/lib/gupshup.rb CHANGED
@@ -9,13 +9,18 @@ require 'httpclient'
9
9
  module Gupshup
10
10
  VERSION = '0.1.2'
11
11
  class Enterprise
12
- def initialize(login,password)
12
+ def initialize(login,password, token = nil)
13
13
  @api_url = 'http://enterprise.smsgupshup.com/GatewayAPI/rest'
14
14
  @api_params = {}
15
15
  @api_params[:userid] = login
16
16
  @api_params[:password] = password
17
17
  @api_params[:v] = '1.1'
18
18
  @api_params[:auth_scheme] = 'PLAIN'
19
+ if token
20
+ @api_params[:auth_scheme] = 'TOKEN'
21
+ @api_params[:token] = token
22
+ @api_params.delete(:password)
23
+ end
19
24
  end
20
25
 
21
26
  def send_message(msg,number,msg_type = 'TEXT',opts = {})
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gupshup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nilesh Trivedi
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-05 00:00:00 +05:30
12
+ date: 2010-02-16 00:00:00 +05:30
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -24,7 +24,7 @@ dependencies:
24
24
  version:
25
25
  description: Ruby wrapper for SMSGupShup API
26
26
  email:
27
- - nilesh.tr@gmail.com
27
+ - nilesh@webaroo.com
28
28
  executables: []
29
29
 
30
30
  extensions: []