gupshup 0.2.3 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +7 -0
  2. data/README.rdoc +7 -8
  3. data/lib/gupshup.rb +2 -2
  4. metadata +32 -49
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7ad61ee07eb4ea01ecb2538312d801cfa022077c
4
+ data.tar.gz: 098b5dcd8e69fd99f8d544718c3b0ad1567c8e4c
5
+ SHA512:
6
+ metadata.gz: cdd151f69b47ee6d7308fc22bc1b2bb880fabed03573133ca45404464f557c7e267a498a7a6dd56443e77316f61990b7cee745f9cf5b92a042ae9df5401a97ef
7
+ data.tar.gz: 1c74efd2347569a3a5e856338c66fdd8a61dad520d3ce8f941721a19e568844a7422e3013b2f96a1e80ecd600eec822de048e6ac88061b91baff455c1a430599
@@ -14,9 +14,8 @@ http://enterprise.smsgupshup.com/doc/GatewayAPIDoc.pdf
14
14
 
15
15
  == FEATURES:
16
16
 
17
- * V 0.2.0 Return boolean status instead of raising expectations. API_URL is now configurable.
18
- * V 0.1.5 Added group_post method and a generic call_api method. All methods
19
- now expect a hash of API params instead if individual arguments
17
+ * V 0.2.0 Return boolean status instead of raising exceptions. API_URL is now configurable.
18
+ * V 0.1.5 Added group_post method and a generic call_api method. All methods now expect a hash of API params instead if individual arguments
20
19
  * V 0.1.2 Bulk file upload implemented. Only CSV format supported for now.
21
20
  * V 0.1.0 send_vcard and send_unicode_message implemented. Error checking.
22
21
  * V 0.0.5 send_text_message and send_flash_message are implemented
@@ -24,22 +23,22 @@ http://enterprise.smsgupshup.com/doc/GatewayAPIDoc.pdf
24
23
 
25
24
  == USAGE:
26
25
 
27
- # "target_phone_number" should be a 12 digit Indian mobile number starting with "919" (either integer or string)
26
+ # "target_phone_number" should be a 12 digit Indian mobile number starting with "91" (either integer or string)
28
27
 
29
28
  gup = Gupshup::Enterprise.new(:userid => 'your_gupshup_login', :password => 'your_password')
30
29
 
31
30
  #send a normal text message
32
- gup.send_text_message(:msg => 'sms message text', :send_to => '919xxxxxxxxx')
31
+ gup.send_text_message(:msg => 'sms message text', :send_to => '91xxxxxxxxxx')
33
32
 
34
33
  #flash messages appear on mobile's screen immediately but may not be saved on some handsets
35
- gup.send_flash_message(:msg => 'sms message text', :send_to => '919xxxxxxxxx')
34
+ gup.send_flash_message(:msg => 'sms message text', :send_to => '91xxxxxxxxxx')
36
35
 
37
36
  #send a contact in VCARD format
38
37
  vcard = "BEGIN:VCARD\r\nVERSION:1.2\r\nN:ICICI\r\nTEL:18002098888\r\nEND:VCARD"
39
- gup.send_vcard(:msg => vcard, :send_to => '919xxxxxxxxx')
38
+ gup.send_vcard(:msg => vcard, :send_to => '91xxxxxxxxxx')
40
39
 
41
40
  #send a non-english message with a hex-encoded UTF-8 string
42
- gup.send_unicode_message(:msg => "\xE0\xA4\x97\xE0\xA4\xAA\xE0\xA4\xB6\xE0\xA4\xAA", :send_to => '919xxxxxxxxx') # will send "gupshup" in Devnagari script
41
+ gup.send_unicode_message(:msg => "\xE0\xA4\x97\xE0\xA4\xAA\xE0\xA4\xB6\xE0\xA4\xAA", :send_to => '91xxxxxxxxxx') # will send "gupshup" in Devnagari script
43
42
 
44
43
  #Upload a CSV file for bulk messages
45
44
  gup.bulk_file_upload(file_path)
@@ -50,7 +50,7 @@ module Gupshup
50
50
  puts "API call '#{opts[:method]}' failed: #{resp}"
51
51
  return false, resp
52
52
  end
53
- return true, resp
53
+ return true, nil
54
54
  else
55
55
  return false, "HTTP Error : #{res}"
56
56
  end
@@ -94,7 +94,7 @@ module Gupshup
94
94
  msg_params[:xlsFile] = file
95
95
  resp = HTTPClient.post(@api_url,msg_params.merge(@api_params).merge(opts))
96
96
  file.close
97
- puts resp.body.content
97
+ p resp.body
98
98
  end
99
99
 
100
100
  def group_post(opts)
metadata CHANGED
@@ -1,49 +1,39 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: gupshup
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 2
8
- - 3
9
- version: 0.2.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.0
10
5
  platform: ruby
11
- authors:
6
+ authors:
12
7
  - Nilesh Trivedi
13
8
  autorequire:
14
9
  bindir: bin
15
10
  cert_chain: []
16
-
17
- date: 2010-04-07 00:00:00 +05:30
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
11
+ date: 2015-03-04 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
21
14
  name: httpclient
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- requirements:
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
25
17
  - - ">="
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 2
29
- - 1
30
- - 5
31
- - 2
18
+ - !ruby/object:Gem::Version
32
19
  version: 2.1.5.2
33
20
  type: :runtime
34
- version_requirements: *id001
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 2.1.5.2
35
27
  description: Ruby wrapper for SMSGupShup API
36
- email:
37
- - nilesh@webaroo.com
28
+ email:
29
+ - nilesh.tr@gmail.com
38
30
  executables: []
39
-
40
31
  extensions: []
41
-
42
- extra_rdoc_files:
32
+ extra_rdoc_files:
43
33
  - History.txt
44
34
  - Manifest.txt
45
35
  - PostInstall.txt
46
- files:
36
+ files:
47
37
  - History.txt
48
38
  - Manifest.txt
49
39
  - PostInstall.txt
@@ -55,36 +45,29 @@ files:
55
45
  - script/generate
56
46
  - test/test_gupshup.rb
57
47
  - test/test_helper.rb
58
- has_rdoc: true
59
48
  homepage: http://github.com/nileshtrivedi/gupshup
60
49
  licenses: []
61
-
50
+ metadata: {}
62
51
  post_install_message: PostInstall.txt
63
52
  rdoc_options: []
64
-
65
- require_paths:
53
+ require_paths:
66
54
  - lib
67
- required_ruby_version: !ruby/object:Gem::Requirement
68
- requirements:
55
+ required_ruby_version: !ruby/object:Gem::Requirement
56
+ requirements:
69
57
  - - ">="
70
- - !ruby/object:Gem::Version
71
- segments:
72
- - 0
73
- version: "0"
74
- required_rubygems_version: !ruby/object:Gem::Requirement
75
- requirements:
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
60
+ required_rubygems_version: !ruby/object:Gem::Requirement
61
+ requirements:
76
62
  - - ">="
77
- - !ruby/object:Gem::Version
78
- segments:
79
- - 0
80
- version: "0"
63
+ - !ruby/object:Gem::Version
64
+ version: '0'
81
65
  requirements: []
82
-
83
66
  rubyforge_project: gupshup
84
- rubygems_version: 1.3.6
67
+ rubygems_version: 2.4.5
85
68
  signing_key:
86
69
  specification_version: 3
87
70
  summary: Ruby wrapper for SMSGupShup API
88
- test_files:
71
+ test_files:
89
72
  - test/test_gupshup.rb
90
73
  - test/test_helper.rb