gupshup_lib 1.0.6 → 1.0.7

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
  SHA256:
3
- metadata.gz: acfc99e1499c3e4053611c51afe7092f0aab16ad5227d25b4f2962047a95f74f
4
- data.tar.gz: ec4a0dc7955fc4d5bb53ffaef514bf74965e79ab0f9c80a4df79d30791920b4e
3
+ metadata.gz: ae8f9d8786730fbe93af4c6ca0eb216685c04c4c2e221f59fd0a1fc173fe3c9a
4
+ data.tar.gz: 05e0eb3dcbdc36294b3d5b30fb3efd4b48e9ca5c2015fb1c780f16b2ec4e7dc5
5
5
  SHA512:
6
- metadata.gz: 160839d66b720dcea1b214636915bb315ec817fd05b9a8498255e299a0f4e7b6587db05eea0b4ef4c290eedc1cbf26a4bff04b64bc8132c2b8dbf056f52d7e19
7
- data.tar.gz: fa1d31f7f6db8a61d2b0e003d5d804887e4d97230ad192dd4774e8e1cb4ff9292c4e8f6d74d4b54e505999610687084e89f2d15d77f79b3473f369c1dadfe285
6
+ metadata.gz: 9389c31fbb3260f20d37af17a503a11605a54cc521cd5d516525ad77eb04da18f7bd63a666c7e6532a5f9c10374ec3b74e69b3e5230f2c7b7bc4bde791de0b8f
7
+ data.tar.gz: 6473d6cc9d7810c9046444b39c2b5f03ff8b3487fd6f0cea90677ec8e61da02e934883b31b754deb27f726155156a95ed9d62c7a54772057ab0344186e5e01ff
data/lib/gupshup_lib.rb CHANGED
@@ -44,6 +44,16 @@ module GupshupLib
44
44
  params[:filename]=filename if filename!=nil
45
45
  return sendWhatsApp(from:from,to:to,body:params)
46
46
  end
47
+
48
+ def sendWhatsAppFile(from:, to:, fileUrl:, caption: nil, filename: nil)
49
+ params={
50
+ "type": "file",
51
+ "url": fileUrl
52
+ }
53
+ params[:caption]=caption if caption!=nil
54
+ params[:filename]=filename if filename!=nil
55
+ return sendWhatsApp(from:from,to:to,body:params)
56
+ end
47
57
  end
48
58
  end
49
59
  require 'gupshup_lib/whatsapp'
@@ -26,6 +26,7 @@ def self.post(apikey:,body:,url:)
26
26
 
27
27
 
28
28
  rescue StandardError
29
+ puts response
29
30
  return {code:response.code, response:response.read_body}
30
31
 
31
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gupshup_lib
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - ShoutOUT Labs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-02 00:00:00.000000000 Z
11
+ date: 2021-07-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Gupshup API integration
14
14
  email: support@getshoutout.com