warb 0.1.0
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 +7 -0
- data/.rspec +3 -0
- data/.rubocop.yml +8 -0
- data/CHANGELOG.md +25 -0
- data/README.md +135 -0
- data/Rakefile +12 -0
- data/docs/README.md +16 -0
- data/docs/components/README.md +24 -0
- data/docs/components/address.md +68 -0
- data/docs/components/button.md +61 -0
- data/docs/components/copy_code_button.md +57 -0
- data/docs/components/cta_action.md +13 -0
- data/docs/components/email.md +40 -0
- data/docs/components/list_action.md +29 -0
- data/docs/components/name.md +49 -0
- data/docs/components/org.md +42 -0
- data/docs/components/phone.md +57 -0
- data/docs/components/reply_button_action.md +32 -0
- data/docs/components/row.md +13 -0
- data/docs/components/section.md +30 -0
- data/docs/components/url.md +40 -0
- data/docs/components/url_button.md +57 -0
- data/docs/images/contact-with-wa_id.png +0 -0
- data/docs/images/contact-without-wa_id.png +0 -0
- data/docs/messages/README.md +80 -0
- data/docs/messages/audio.md +119 -0
- data/docs/messages/contact.md +134 -0
- data/docs/messages/document.md +122 -0
- data/docs/messages/flow.md +12 -0
- data/docs/messages/image.md +116 -0
- data/docs/messages/indicator.md +39 -0
- data/docs/messages/interactive_call_to_action_url.md +96 -0
- data/docs/messages/interactive_list.md +159 -0
- data/docs/messages/interactive_reply_button.md +67 -0
- data/docs/messages/location.md +34 -0
- data/docs/messages/location_request.md +21 -0
- data/docs/messages/reaction.md +23 -0
- data/docs/messages/sticker.md +116 -0
- data/docs/messages/template.md +327 -0
- data/docs/messages/text.md +47 -0
- data/docs/messages/video.md +116 -0
- data/docs/resources/currency.md +22 -0
- data/docs/resources/date_time.md +11 -0
- data/docs/resources/index.md +14 -0
- data/docs/resources/text.md +9 -0
- data/docs/setup.md +46 -0
- data/docs/webhook.md +24 -0
- data/examples/audio.rb +86 -0
- data/examples/document.rb +116 -0
- data/examples/image.rb +97 -0
- data/examples/interactive_call_to_action_url.rb +177 -0
- data/examples/interactive_list.rb +201 -0
- data/examples/interactive_reply_button.rb +174 -0
- data/examples/location.rb +85 -0
- data/examples/location_request.rb +55 -0
- data/examples/message.rb +61 -0
- data/examples/sticker.rb +86 -0
- data/examples/video.rb +96 -0
- data/examples/webhook.rb +144 -0
- data/lib/warb/client.rb +46 -0
- data/lib/warb/components/action.rb +121 -0
- data/lib/warb/components/address.rb +31 -0
- data/lib/warb/components/button.rb +29 -0
- data/lib/warb/components/component.rb +19 -0
- data/lib/warb/components/copy_code_button.rb +30 -0
- data/lib/warb/components/email.rb +21 -0
- data/lib/warb/components/name.rb +29 -0
- data/lib/warb/components/org.rb +23 -0
- data/lib/warb/components/phone.rb +23 -0
- data/lib/warb/components/quick_reply_button.rb +15 -0
- data/lib/warb/components/url.rb +21 -0
- data/lib/warb/components/url_button.rb +30 -0
- data/lib/warb/components/voice_call_button.rb +15 -0
- data/lib/warb/configuration.rb +13 -0
- data/lib/warb/connection.rb +47 -0
- data/lib/warb/dispatcher.rb +16 -0
- data/lib/warb/dispatcher_concern.rb +73 -0
- data/lib/warb/indicator_dispatcher.rb +31 -0
- data/lib/warb/language.rb +8 -0
- data/lib/warb/media_dispatcher.rb +46 -0
- data/lib/warb/resources/audio.rb +19 -0
- data/lib/warb/resources/contact.rb +89 -0
- data/lib/warb/resources/currency.rb +45 -0
- data/lib/warb/resources/date_time.rb +34 -0
- data/lib/warb/resources/document.rb +32 -0
- data/lib/warb/resources/flow.rb +34 -0
- data/lib/warb/resources/image.rb +31 -0
- data/lib/warb/resources/interactive_call_to_action_url.rb +48 -0
- data/lib/warb/resources/interactive_list.rb +36 -0
- data/lib/warb/resources/interactive_reply_button.rb +48 -0
- data/lib/warb/resources/location.rb +31 -0
- data/lib/warb/resources/location_request.rb +24 -0
- data/lib/warb/resources/reaction.rb +19 -0
- data/lib/warb/resources/resource.rb +59 -0
- data/lib/warb/resources/sticker.rb +19 -0
- data/lib/warb/resources/template.rb +166 -0
- data/lib/warb/resources/text.rb +47 -0
- data/lib/warb/resources/video.rb +31 -0
- data/lib/warb/template_dispatcher.rb +10 -0
- data/lib/warb/utils.rb +5 -0
- data/lib/warb/version.rb +5 -0
- data/lib/warb.rb +69 -0
- data/sig/warb.rbs +4 -0
- metadata +172 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Warb
|
|
4
|
+
module Resources
|
|
5
|
+
class Resource
|
|
6
|
+
def initialize(**params)
|
|
7
|
+
@params = params
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def call(recipient_number, reply_to: nil)
|
|
11
|
+
common_resources_params(recipient_number, reply_to).merge build_payload
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def build_header
|
|
15
|
+
raise NotImplementedError
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def build_payload
|
|
19
|
+
raise NotImplementedError
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def build_template_positional_parameter
|
|
23
|
+
raise NotImplementedError
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def build_template_named_parameter(paramater_name)
|
|
27
|
+
raise NotImplementedError
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def set_text_header
|
|
31
|
+
raise NotImplementedError
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def set_image_header
|
|
35
|
+
raise NotImplementedError
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def set_video_header
|
|
39
|
+
raise NotImplementedError
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def set_document_header
|
|
43
|
+
raise NotImplementedError
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
protected
|
|
47
|
+
|
|
48
|
+
def common_resources_params(recipient_number, reply_to)
|
|
49
|
+
{
|
|
50
|
+
messaging_product: Warb::MESSAGING_PRODUCT,
|
|
51
|
+
recipient_type: Warb::RECIPIENT_TYPE,
|
|
52
|
+
to: recipient_number
|
|
53
|
+
}.tap do |params|
|
|
54
|
+
params[:context] = { message_id: reply_to } if reply_to
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Warb
|
|
4
|
+
module Resources
|
|
5
|
+
class Sticker < Resource
|
|
6
|
+
attr_accessor :media_id, :link
|
|
7
|
+
|
|
8
|
+
def build_payload
|
|
9
|
+
{
|
|
10
|
+
type: "sticker",
|
|
11
|
+
sticker: {
|
|
12
|
+
id: media_id || @params[:media_id],
|
|
13
|
+
link: link || @params[:link]
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Warb
|
|
4
|
+
module Resources
|
|
5
|
+
class Template < Resource
|
|
6
|
+
attr_accessor :name, :language, :resources, :header, :buttons
|
|
7
|
+
|
|
8
|
+
def initialize(**params)
|
|
9
|
+
super(**params)
|
|
10
|
+
|
|
11
|
+
@name = params[:name]
|
|
12
|
+
@language = params[:language]
|
|
13
|
+
@resources = params[:resources]
|
|
14
|
+
@buttons = []
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def build_payload
|
|
18
|
+
{
|
|
19
|
+
type: "template",
|
|
20
|
+
template: {
|
|
21
|
+
name: name,
|
|
22
|
+
language: {
|
|
23
|
+
code: language
|
|
24
|
+
},
|
|
25
|
+
components: [
|
|
26
|
+
component_header,
|
|
27
|
+
component_body,
|
|
28
|
+
*buttons
|
|
29
|
+
].compact
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def add_currency_parameter(parameter_name = nil, **params, &block)
|
|
35
|
+
add_parameter(parameter_name, Currency.new(**params), &block)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def add_date_time_parameter(parameter_name = nil, **params, &block)
|
|
39
|
+
add_parameter(parameter_name, DateTime.new(**params), &block)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def add_text_parameter(parameter_name = nil, **params, &block)
|
|
43
|
+
add_parameter(parameter_name, Text.new(**params), &block)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def set_text_header(content: nil, message: nil, text: nil, parameter_name: nil, &block)
|
|
47
|
+
set_header(Text.new(content:, message:, text:, parameter_name:), &block)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def set_image_header(media_id: nil, link: nil, &block)
|
|
51
|
+
set_header(Image.new(media_id:, link:), &block)
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def set_document_header(media_id: nil, link: nil, filename: nil, &block)
|
|
55
|
+
set_header(Document.new(media_id:, link:, filename:), &block)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def set_video_header(media_id: nil, link: nil, &block)
|
|
59
|
+
set_header(Video.new(media_id:, link:), &block)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def set_location_header(latitude: nil, longitude: nil, address: nil, name: nil, &block)
|
|
63
|
+
set_header(Location.new(latitude:, longitude:, address:, name:), &block)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def add_quick_reply_button(index: position, &block)
|
|
67
|
+
add_button(Warb::Components::QuickReplyButton.new(index:), &block)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def add_dynamic_url_button(index: position, text: nil, &block)
|
|
71
|
+
add_button(Warb::Components::UrlButton.new(index:, text:), &block)
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
alias_method :add_auth_code_button, :add_dynamic_url_button
|
|
75
|
+
|
|
76
|
+
def add_copy_code_button(index: position, coupon_code: nil, &block)
|
|
77
|
+
add_button(Warb::Components::CopyCodeButton.new(index:, coupon_code:), &block)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
def add_voice_call_button(index: position, &block)
|
|
81
|
+
add_button(Warb::Components::VoiceCallButton.new(index:), &block)
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
def add_button(instance, &block)
|
|
85
|
+
return @buttons << instance.to_h unless block_given?
|
|
86
|
+
|
|
87
|
+
@buttons << instance.tap(&block).to_h
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
private
|
|
91
|
+
|
|
92
|
+
def set_header(instance, &block)
|
|
93
|
+
@header = instance
|
|
94
|
+
|
|
95
|
+
block_given? ? @header.tap(&block) : @header
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def component_header
|
|
100
|
+
return unless header.is_a? Resource
|
|
101
|
+
|
|
102
|
+
{
|
|
103
|
+
type: "header",
|
|
104
|
+
parameters: [
|
|
105
|
+
header.build_header
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
def component_body
|
|
111
|
+
return if resources.nil? || resources.empty?
|
|
112
|
+
|
|
113
|
+
{
|
|
114
|
+
type: "body",
|
|
115
|
+
parameters: build_parameters
|
|
116
|
+
}
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
def build_parameters
|
|
120
|
+
case resources
|
|
121
|
+
when Hash
|
|
122
|
+
named_parameters
|
|
123
|
+
when Array
|
|
124
|
+
positional_parameters
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
def named_parameters
|
|
129
|
+
resources.map do |parameter_name, resource|
|
|
130
|
+
resource.build_template_named_parameter(parameter_name.to_s)
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
def positional_parameters
|
|
135
|
+
resources.map(&:build_template_positional_parameter)
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
def add_parameter(parameter_name, instance, &block)
|
|
139
|
+
case resources
|
|
140
|
+
when Hash
|
|
141
|
+
resources[parameter_name.to_s] = instance
|
|
142
|
+
when Array
|
|
143
|
+
resources << instance
|
|
144
|
+
else
|
|
145
|
+
initialize_resources(parameter_name, instance, &block)
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
block_given? ? instance.tap(&block) : instance
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
def initialize_resources(parameter_name, instance)
|
|
152
|
+
if parameter_name.nil?
|
|
153
|
+
@resources = []
|
|
154
|
+
@resources << instance
|
|
155
|
+
else
|
|
156
|
+
@resources = {}
|
|
157
|
+
@resources[parameter_name] = instance
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
def position
|
|
162
|
+
buttons.count
|
|
163
|
+
end
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Warb
|
|
4
|
+
module Resources
|
|
5
|
+
class Text < Resource
|
|
6
|
+
attr_accessor :content, :text, :message, :preview_url, :parameter_name
|
|
7
|
+
|
|
8
|
+
def build_header
|
|
9
|
+
{ type: "text", text: message_per_priority }.tap do |header|
|
|
10
|
+
parameter_name ||= @params[:parameter_name]
|
|
11
|
+
header[:parameter_name] = parameter_name unless parameter_name.nil?
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def build_payload
|
|
16
|
+
{
|
|
17
|
+
type: "text",
|
|
18
|
+
text: {
|
|
19
|
+
preview_url: preview_url || @params[:preview_url],
|
|
20
|
+
body: message_per_priority
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def build_template_named_parameter(parameter_name)
|
|
26
|
+
{
|
|
27
|
+
type: "text",
|
|
28
|
+
text: message_per_priority,
|
|
29
|
+
parameter_name: parameter_name
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def build_template_positional_parameter
|
|
34
|
+
{
|
|
35
|
+
type: "text",
|
|
36
|
+
text: message_per_priority
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
private
|
|
41
|
+
|
|
42
|
+
def message_per_priority
|
|
43
|
+
content || text || message || @params[:content] || @params[:text] || @params[:message]
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Warb
|
|
4
|
+
module Resources
|
|
5
|
+
class Video < Resource
|
|
6
|
+
attr_accessor :media_id, :link, :caption
|
|
7
|
+
|
|
8
|
+
def build_header
|
|
9
|
+
common_video_params
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def build_payload
|
|
13
|
+
params = common_video_params
|
|
14
|
+
params[:video][:caption] = caption || @params[:caption]
|
|
15
|
+
params
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
private
|
|
19
|
+
|
|
20
|
+
def common_video_params
|
|
21
|
+
{
|
|
22
|
+
type: "video",
|
|
23
|
+
video: {
|
|
24
|
+
id: media_id || @params[:media_id],
|
|
25
|
+
link: link || @params[:link]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
module Warb
|
|
2
|
+
class TemplateDispatcher < Dispatcher
|
|
3
|
+
def list(**args)
|
|
4
|
+
filter = args.slice(:limit, :fields, :after, :before)
|
|
5
|
+
filter[:fields] = filter[:fields].join(",") if filter[:fields].is_a?(Array)
|
|
6
|
+
|
|
7
|
+
@client.get("message_templates", endpoint_prefix: :business_id, data: filter).body
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
data/lib/warb/utils.rb
ADDED
data/lib/warb/version.rb
ADDED
data/lib/warb.rb
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "faraday"
|
|
4
|
+
require "faraday/multipart"
|
|
5
|
+
require_relative "warb/version"
|
|
6
|
+
require_relative "warb/language"
|
|
7
|
+
require_relative "warb/configuration"
|
|
8
|
+
require_relative "warb/dispatcher_concern"
|
|
9
|
+
require_relative "warb/client"
|
|
10
|
+
require_relative "warb/resources/resource"
|
|
11
|
+
require_relative "warb/resources/text"
|
|
12
|
+
require_relative "warb/resources/image"
|
|
13
|
+
require_relative "warb/resources/video"
|
|
14
|
+
require_relative "warb/resources/sticker"
|
|
15
|
+
require_relative "warb/resources/audio"
|
|
16
|
+
require_relative "warb/resources/document"
|
|
17
|
+
require_relative "warb/resources/location"
|
|
18
|
+
require_relative "warb/resources/reaction"
|
|
19
|
+
require_relative "warb/resources/location_request"
|
|
20
|
+
require_relative "warb/resources/interactive_reply_button"
|
|
21
|
+
require_relative "warb/resources/interactive_list"
|
|
22
|
+
require_relative "warb/resources/interactive_call_to_action_url"
|
|
23
|
+
require_relative "warb/resources/contact"
|
|
24
|
+
require_relative "warb/resources/template"
|
|
25
|
+
require_relative "warb/resources/currency"
|
|
26
|
+
require_relative "warb/resources/date_time"
|
|
27
|
+
require_relative "warb/resources/flow"
|
|
28
|
+
require_relative "warb/dispatcher"
|
|
29
|
+
require_relative "warb/media_dispatcher"
|
|
30
|
+
require_relative "warb/template_dispatcher"
|
|
31
|
+
require_relative "warb/indicator_dispatcher"
|
|
32
|
+
require_relative "warb/utils"
|
|
33
|
+
require_relative "warb/components/component"
|
|
34
|
+
require_relative "warb/components/button"
|
|
35
|
+
require_relative "warb/components/quick_reply_button"
|
|
36
|
+
require_relative "warb/components/url_button"
|
|
37
|
+
require_relative "warb/components/copy_code_button"
|
|
38
|
+
require_relative "warb/components/voice_call_button"
|
|
39
|
+
require_relative "warb/components/action"
|
|
40
|
+
|
|
41
|
+
module Warb
|
|
42
|
+
MESSAGING_PRODUCT = "whatsapp"
|
|
43
|
+
RECIPIENT_TYPE = "individual"
|
|
44
|
+
|
|
45
|
+
class Error < StandardError; end
|
|
46
|
+
# Your code goes here...
|
|
47
|
+
|
|
48
|
+
class << self
|
|
49
|
+
include DispatcherConcern
|
|
50
|
+
|
|
51
|
+
def new(**args)
|
|
52
|
+
Client.new(**args)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def client
|
|
56
|
+
@client ||= Client.new(configuration)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def configuration
|
|
60
|
+
@configuration ||= Configuration.new
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def setup
|
|
64
|
+
yield(configuration)
|
|
65
|
+
|
|
66
|
+
client
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
data/sig/warb.rbs
ADDED
metadata
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: warb
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Rebase
|
|
8
|
+
bindir: exe
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: faraday
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - "~>"
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '2.13'
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - "~>"
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '2.13'
|
|
26
|
+
- !ruby/object:Gem::Dependency
|
|
27
|
+
name: faraday-multipart
|
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - "~>"
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '1.1'
|
|
33
|
+
type: :runtime
|
|
34
|
+
prerelease: false
|
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - "~>"
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '1.1'
|
|
40
|
+
description: A simple yet powerfull whatsapp api wrapper
|
|
41
|
+
email:
|
|
42
|
+
- devs@rebase.com.br
|
|
43
|
+
executables: []
|
|
44
|
+
extensions: []
|
|
45
|
+
extra_rdoc_files: []
|
|
46
|
+
files:
|
|
47
|
+
- ".rspec"
|
|
48
|
+
- ".rubocop.yml"
|
|
49
|
+
- CHANGELOG.md
|
|
50
|
+
- README.md
|
|
51
|
+
- Rakefile
|
|
52
|
+
- docs/README.md
|
|
53
|
+
- docs/components/README.md
|
|
54
|
+
- docs/components/address.md
|
|
55
|
+
- docs/components/button.md
|
|
56
|
+
- docs/components/copy_code_button.md
|
|
57
|
+
- docs/components/cta_action.md
|
|
58
|
+
- docs/components/email.md
|
|
59
|
+
- docs/components/list_action.md
|
|
60
|
+
- docs/components/name.md
|
|
61
|
+
- docs/components/org.md
|
|
62
|
+
- docs/components/phone.md
|
|
63
|
+
- docs/components/reply_button_action.md
|
|
64
|
+
- docs/components/row.md
|
|
65
|
+
- docs/components/section.md
|
|
66
|
+
- docs/components/url.md
|
|
67
|
+
- docs/components/url_button.md
|
|
68
|
+
- docs/images/contact-with-wa_id.png
|
|
69
|
+
- docs/images/contact-without-wa_id.png
|
|
70
|
+
- docs/messages/README.md
|
|
71
|
+
- docs/messages/audio.md
|
|
72
|
+
- docs/messages/contact.md
|
|
73
|
+
- docs/messages/document.md
|
|
74
|
+
- docs/messages/flow.md
|
|
75
|
+
- docs/messages/image.md
|
|
76
|
+
- docs/messages/indicator.md
|
|
77
|
+
- docs/messages/interactive_call_to_action_url.md
|
|
78
|
+
- docs/messages/interactive_list.md
|
|
79
|
+
- docs/messages/interactive_reply_button.md
|
|
80
|
+
- docs/messages/location.md
|
|
81
|
+
- docs/messages/location_request.md
|
|
82
|
+
- docs/messages/reaction.md
|
|
83
|
+
- docs/messages/sticker.md
|
|
84
|
+
- docs/messages/template.md
|
|
85
|
+
- docs/messages/text.md
|
|
86
|
+
- docs/messages/video.md
|
|
87
|
+
- docs/resources/currency.md
|
|
88
|
+
- docs/resources/date_time.md
|
|
89
|
+
- docs/resources/index.md
|
|
90
|
+
- docs/resources/text.md
|
|
91
|
+
- docs/setup.md
|
|
92
|
+
- docs/webhook.md
|
|
93
|
+
- examples/audio.rb
|
|
94
|
+
- examples/document.rb
|
|
95
|
+
- examples/image.rb
|
|
96
|
+
- examples/interactive_call_to_action_url.rb
|
|
97
|
+
- examples/interactive_list.rb
|
|
98
|
+
- examples/interactive_reply_button.rb
|
|
99
|
+
- examples/location.rb
|
|
100
|
+
- examples/location_request.rb
|
|
101
|
+
- examples/message.rb
|
|
102
|
+
- examples/sticker.rb
|
|
103
|
+
- examples/video.rb
|
|
104
|
+
- examples/webhook.rb
|
|
105
|
+
- lib/warb.rb
|
|
106
|
+
- lib/warb/client.rb
|
|
107
|
+
- lib/warb/components/action.rb
|
|
108
|
+
- lib/warb/components/address.rb
|
|
109
|
+
- lib/warb/components/button.rb
|
|
110
|
+
- lib/warb/components/component.rb
|
|
111
|
+
- lib/warb/components/copy_code_button.rb
|
|
112
|
+
- lib/warb/components/email.rb
|
|
113
|
+
- lib/warb/components/name.rb
|
|
114
|
+
- lib/warb/components/org.rb
|
|
115
|
+
- lib/warb/components/phone.rb
|
|
116
|
+
- lib/warb/components/quick_reply_button.rb
|
|
117
|
+
- lib/warb/components/url.rb
|
|
118
|
+
- lib/warb/components/url_button.rb
|
|
119
|
+
- lib/warb/components/voice_call_button.rb
|
|
120
|
+
- lib/warb/configuration.rb
|
|
121
|
+
- lib/warb/connection.rb
|
|
122
|
+
- lib/warb/dispatcher.rb
|
|
123
|
+
- lib/warb/dispatcher_concern.rb
|
|
124
|
+
- lib/warb/indicator_dispatcher.rb
|
|
125
|
+
- lib/warb/language.rb
|
|
126
|
+
- lib/warb/media_dispatcher.rb
|
|
127
|
+
- lib/warb/resources/audio.rb
|
|
128
|
+
- lib/warb/resources/contact.rb
|
|
129
|
+
- lib/warb/resources/currency.rb
|
|
130
|
+
- lib/warb/resources/date_time.rb
|
|
131
|
+
- lib/warb/resources/document.rb
|
|
132
|
+
- lib/warb/resources/flow.rb
|
|
133
|
+
- lib/warb/resources/image.rb
|
|
134
|
+
- lib/warb/resources/interactive_call_to_action_url.rb
|
|
135
|
+
- lib/warb/resources/interactive_list.rb
|
|
136
|
+
- lib/warb/resources/interactive_reply_button.rb
|
|
137
|
+
- lib/warb/resources/location.rb
|
|
138
|
+
- lib/warb/resources/location_request.rb
|
|
139
|
+
- lib/warb/resources/reaction.rb
|
|
140
|
+
- lib/warb/resources/resource.rb
|
|
141
|
+
- lib/warb/resources/sticker.rb
|
|
142
|
+
- lib/warb/resources/template.rb
|
|
143
|
+
- lib/warb/resources/text.rb
|
|
144
|
+
- lib/warb/resources/video.rb
|
|
145
|
+
- lib/warb/template_dispatcher.rb
|
|
146
|
+
- lib/warb/utils.rb
|
|
147
|
+
- lib/warb/version.rb
|
|
148
|
+
- sig/warb.rbs
|
|
149
|
+
homepage: https://github.com/Rebase-BR/warb
|
|
150
|
+
licenses: []
|
|
151
|
+
metadata:
|
|
152
|
+
homepage_uri: https://github.com/Rebase-BR/warb
|
|
153
|
+
source_code_uri: https://github.com/Rebase-BR/warb
|
|
154
|
+
changelog_uri: https://github.com/Rebase-BR/warb/blob/main/CHANGELOG.md?ref_type=heads
|
|
155
|
+
rdoc_options: []
|
|
156
|
+
require_paths:
|
|
157
|
+
- lib
|
|
158
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
159
|
+
requirements:
|
|
160
|
+
- - ">="
|
|
161
|
+
- !ruby/object:Gem::Version
|
|
162
|
+
version: 3.1.0
|
|
163
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
164
|
+
requirements:
|
|
165
|
+
- - ">="
|
|
166
|
+
- !ruby/object:Gem::Version
|
|
167
|
+
version: '0'
|
|
168
|
+
requirements: []
|
|
169
|
+
rubygems_version: 3.6.7
|
|
170
|
+
specification_version: 4
|
|
171
|
+
summary: A simple yet powerfull whatsapp api wrapper
|
|
172
|
+
test_files: []
|