gupshup-sdk 1.0.2 → 1.0.3
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 +4 -4
- data/lib/gupshup.rb +6 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3b417f30c3c1b505f7c1225d8268daf9b3cc12acd24dea7b2e8d45295b38d25
|
4
|
+
data.tar.gz: '0929d643a1041b3b56b08a5134d311ff1708dab64e01101510f24a974cf5147c'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40fe8594615cc0c4539f3ff182fdf8eb64be6e4bcdde08a249e8264c6bdd13c434822b469a65e3508636fa69ecb77ef6bfaaeda078c41bf87c7a033cd09797a1
|
7
|
+
data.tar.gz: bbb17e3476a753a1ec63c3a92511ccf79a5265b00eec210bcd30cbf6af049e1c3454cfe56fb5f3c92198e0225b3d8ca21a608c4eaa862d0e6da53d651195f4c3
|
data/lib/gupshup.rb
CHANGED
@@ -21,14 +21,17 @@ module Gupshup
|
|
21
21
|
@appName=appName
|
22
22
|
end
|
23
23
|
|
24
|
-
|
24
|
+
def sendWhatsApp(from:,to:,body:)
|
25
|
+
return WhatspApp.send(self.apikey,from,to,JSON.generate(body),self.appName)
|
26
|
+
end
|
27
|
+
|
25
28
|
def sendWhatsAppText(from:,to:,body:)
|
26
29
|
params={
|
27
30
|
"isHSM":"true",
|
28
31
|
"type": "text",
|
29
32
|
"text": body
|
30
33
|
}
|
31
|
-
return
|
34
|
+
return sendWhatsApp(from:from,to:to,body:params)
|
32
35
|
end
|
33
36
|
|
34
37
|
def sendWhatsAppImage(from:,to:,imageUrl:,previewUrl: nil,caption: nil, filename: nil)
|
@@ -39,7 +42,7 @@ module Gupshup
|
|
39
42
|
params[:previewUrl]=previewUrl|| imageUrl
|
40
43
|
params[:caption]=caption if caption!=nil
|
41
44
|
params[:filename]=filename if filename!=nil
|
42
|
-
return
|
45
|
+
return sendWhatsApp(from:from,to:to,body:params)
|
43
46
|
end
|
44
47
|
end
|
45
48
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gupshup-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
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-
|
11
|
+
date: 2021-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Gupshup API integration
|
14
14
|
email: support@getshoutout.com
|