viberroo 0.0.7 → 0.0.8
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/viberroo/bot.rb +4 -0
- data/lib/viberroo/message.rb +0 -8
- data/lib/viberroo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 78bcb0e32349405f96129347dc9cbca08f1af7b3fc15b0bdc93aef2199c76e1e
|
|
4
|
+
data.tar.gz: 98d3a81828703929aead8b437bfd3aab024c43491d2d6bf1c087f8fc9f6ff1c1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d4e6e9eba4b27eb6442800440f8849ec957528753fbcee168dbd1c8e0cb0ad62d4ed51173ad5b5be0aeb567dbab9cd4d4e504ebb38a1bfcbeb55d9267b152228
|
|
7
|
+
data.tar.gz: 07d4b7a5b117c958fc6af4eef204283b7af93c62fb14de25cc5f76019b9f59a8f5280bd3ec581c3dbed84ca224a4c7f81a63ee60735bdc9ee9784eae1bed3bed
|
data/lib/viberroo/bot.rb
CHANGED
data/lib/viberroo/message.rb
CHANGED
|
@@ -3,7 +3,6 @@ module Viberroo
|
|
|
3
3
|
# TODO: add list of params that is mandatory for particular message type,
|
|
4
4
|
# throw exceptions and log errors if not found
|
|
5
5
|
|
|
6
|
-
# required params = text
|
|
7
6
|
def send_message(params = {})
|
|
8
7
|
dispatch({ type: :text }.merge(params))
|
|
9
8
|
end
|
|
@@ -12,37 +11,30 @@ module Viberroo
|
|
|
12
11
|
dispatch({ type: :rich_media, min_api_version: 2 }.merge(params))
|
|
13
12
|
end
|
|
14
13
|
|
|
15
|
-
# required params = location.lat, location.lon
|
|
16
14
|
def send_location(params = {})
|
|
17
15
|
dispatch({ type: :location, min_api_version: 3 }.merge(params))
|
|
18
16
|
end
|
|
19
17
|
|
|
20
|
-
# required params = text, media
|
|
21
18
|
def send_picture(params = {})
|
|
22
19
|
dispatch({ type: :picture }.merge(params))
|
|
23
20
|
end
|
|
24
21
|
|
|
25
|
-
# required params = text, media
|
|
26
22
|
def send_video(params = {})
|
|
27
23
|
dispatch({ type: :video }.merge(params))
|
|
28
24
|
end
|
|
29
25
|
|
|
30
|
-
# required params = media, size, file_name
|
|
31
26
|
def send_file(params = {})
|
|
32
27
|
dispatch({ type: :file }.merge(params))
|
|
33
28
|
end
|
|
34
29
|
|
|
35
|
-
# required params = contact, contact.name, contact.phone_number
|
|
36
30
|
def send_contact(params = {})
|
|
37
31
|
dispatch({ type: :contact }.merge(params))
|
|
38
32
|
end
|
|
39
33
|
|
|
40
|
-
# required params = media
|
|
41
34
|
def send_url(params = {})
|
|
42
35
|
dispatch({ type: :url }.merge(params))
|
|
43
36
|
end
|
|
44
37
|
|
|
45
|
-
# required params = sticker_id
|
|
46
38
|
# https://viber.github.io/docs/tools/sticker-ids/
|
|
47
39
|
def send_sticker(params = {})
|
|
48
40
|
dispatch({ type: :sticker }.merge(params))
|
data/lib/viberroo/version.rb
CHANGED