evolution_api 1.0.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/CHANGELOG.md +52 -0
- data/LICENSE.txt +21 -0
- data/README.md +483 -0
- data/bin/test_gem.rb +162 -0
- data/lib/evolution_api/chat.rb +82 -0
- data/lib/evolution_api/client.rb +351 -0
- data/lib/evolution_api/contact.rb +74 -0
- data/lib/evolution_api/errors.rb +95 -0
- data/lib/evolution_api/instance.rb +161 -0
- data/lib/evolution_api/message.rb +249 -0
- data/lib/evolution_api/version.rb +5 -0
- data/lib/evolution_api/webhook.rb +44 -0
- data/lib/evolution_api.rb +86 -0
- metadata +226 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f9d422931f741f23c7b75790231e4922e80a4da988ca81efe6ad655cb802f6e8
|
4
|
+
data.tar.gz: 7afc22ac6c06add8f996dd52e05e6df8ac36369e76a985eb31afc3ada1c32fc6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5cbbedbfbe2392247e5cb0eb1b8009185a88f9623b1c174b0c2f7d2e52106830c2b42b15633551e8203dd5459d4df198d4d77c5221a616ac367c588983c7bf98
|
7
|
+
data.tar.gz: 06ae0b0533e58315d95b38b25d83335332dd869b37511735e4809f8d4ceb38c57b251d1ea66e66ecd93d9a863c03e79dc8faa50ad9a7b9f6a0d21c914685f875
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
Todas as mudanças notáveis neste projeto serão documentadas neste arquivo.
|
4
|
+
|
5
|
+
O formato é baseado em [Keep a Changelog](https://keepachangelog.com/pt-BR/1.0.0/),
|
6
|
+
e este projeto adere ao [Versionamento Semântico](https://semver.org/lang/pt-BR/).
|
7
|
+
|
8
|
+
## [1.0.0] - 2024-01-XX
|
9
|
+
|
10
|
+
### Adicionado
|
11
|
+
- Cliente Ruby completo para Evolution API
|
12
|
+
- Suporte a todos os endpoints da Evolution API
|
13
|
+
- Sistema de configuração flexível com Dry::Configurable
|
14
|
+
- Tratamento de erros personalizado com exceções específicas
|
15
|
+
- Retry automático em caso de falhas de rede
|
16
|
+
- Classes auxiliares para Message, Chat, Contact, Instance e Webhook
|
17
|
+
- Validação de dados com Dry::Validation
|
18
|
+
- Documentação completa com YARD
|
19
|
+
- Testes abrangentes com RSpec e VCR
|
20
|
+
- Configuração de RuboCop para padrões de código
|
21
|
+
- Suporte a webhooks
|
22
|
+
- Gerenciamento completo de instâncias
|
23
|
+
- Envio de todos os tipos de mensagem (texto, imagem, áudio, vídeo, documento, localização, contato)
|
24
|
+
- Mensagens interativas (botões e listas)
|
25
|
+
- Gerenciamento de chats e contatos
|
26
|
+
- Verificação de números no WhatsApp
|
27
|
+
- Bloqueio/desbloqueio de contatos
|
28
|
+
|
29
|
+
### Características Técnicas
|
30
|
+
- Ruby 3.0+ como versão mínima
|
31
|
+
- HTTParty para requisições HTTP
|
32
|
+
- JSON para serialização
|
33
|
+
- Configuração via variáveis de ambiente
|
34
|
+
- Timeout configurável
|
35
|
+
- Headers personalizáveis
|
36
|
+
- Logs configuráveis
|
37
|
+
- Cache opcional
|
38
|
+
|
39
|
+
### Documentação
|
40
|
+
- README completo em português brasileiro
|
41
|
+
- Exemplos de uso para todos os métodos
|
42
|
+
- Guia de configuração
|
43
|
+
- Tratamento de erros
|
44
|
+
- Guia de testes
|
45
|
+
- Documentação YARD
|
46
|
+
|
47
|
+
### Testes
|
48
|
+
- Testes unitários para todas as classes
|
49
|
+
- Testes de integração com VCR
|
50
|
+
- Cobertura de casos de erro
|
51
|
+
- Fixtures para testes
|
52
|
+
- Configuração de ambiente de teste
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2024 Evolution API Ruby Client
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,483 @@
|
|
1
|
+
# Evolution API Ruby Client
|
2
|
+
|
3
|
+
[](https://ruby-lang.org)
|
4
|
+
[](https://rubygems.org/gems/evolution_api)
|
5
|
+
[](LICENSE.txt)
|
6
|
+
[](https://github.com/tiagotobias2003/evolution_api_ruby)
|
7
|
+
[](https://github.com/tiagotobias2003/evolution_api_ruby/actions)
|
8
|
+
|
9
|
+
Uma gem Ruby elegante e poderosa para consumir a [Evolution API](https://doc.evolution-api.com/), permitindo integração fácil com WhatsApp através de uma API REST simples e robusta.
|
10
|
+
|
11
|
+
## 🚀 Características
|
12
|
+
|
13
|
+
- ✅ **Interface Ruby Nativa**: API limpa e intuitiva
|
14
|
+
- ✅ **Suporte Completo**: Todos os endpoints da Evolution API
|
15
|
+
- ✅ **Tratamento de Erros**: Exceções personalizadas e informativas
|
16
|
+
- ✅ **Configuração Flexível**: Sistema de configuração robusto
|
17
|
+
- ✅ **Retry Automático**: Tentativas automáticas em caso de falha
|
18
|
+
- ✅ **Validação**: Validação de dados com Dry::Validation
|
19
|
+
- ✅ **Documentação Completa**: YARD documentation
|
20
|
+
- ✅ **Testes Abrangentes**: RSpec com VCR para testes confiáveis
|
21
|
+
|
22
|
+
## 📦 Instalação
|
23
|
+
|
24
|
+
Adicione a gem ao seu `Gemfile`:
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
gem 'evolution_api'
|
28
|
+
```
|
29
|
+
|
30
|
+
E execute:
|
31
|
+
|
32
|
+
```bash
|
33
|
+
bundle install
|
34
|
+
```
|
35
|
+
|
36
|
+
Ou instale diretamente:
|
37
|
+
|
38
|
+
```bash
|
39
|
+
gem install evolution_api
|
40
|
+
```
|
41
|
+
|
42
|
+
## ⚙️ Configuração
|
43
|
+
|
44
|
+
### Configuração Básica
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
require 'evolution_api'
|
48
|
+
|
49
|
+
EvolutionApi.configure do |config|
|
50
|
+
config.base_url = "http://localhost:8080" # URL da sua Evolution API
|
51
|
+
config.api_key = "sua_api_key_aqui" # Sua chave API (opcional)
|
52
|
+
config.timeout = 30 # Timeout em segundos
|
53
|
+
config.retry_attempts = 3 # Número de tentativas
|
54
|
+
config.retry_delay = 1 # Delay entre tentativas (segundos)
|
55
|
+
end
|
56
|
+
```
|
57
|
+
|
58
|
+
### Configuração Avançada
|
59
|
+
|
60
|
+
```ruby
|
61
|
+
EvolutionApi.configure do |config|
|
62
|
+
# Configurações básicas
|
63
|
+
config.base_url = "https://api.evolution.com"
|
64
|
+
config.api_key = "sua_chave_api"
|
65
|
+
|
66
|
+
# Configurações de webhook
|
67
|
+
config.webhook_url = "https://seu-site.com/webhook"
|
68
|
+
config.webhook_events = ["connection.update", "message.upsert"]
|
69
|
+
|
70
|
+
# Configurações de log
|
71
|
+
config.logger = Rails.logger
|
72
|
+
config.log_level = :info
|
73
|
+
|
74
|
+
# Configurações de cache
|
75
|
+
config.cache_enabled = true
|
76
|
+
config.cache_ttl = 300 # 5 minutos
|
77
|
+
end
|
78
|
+
```
|
79
|
+
|
80
|
+
## 🎯 Uso Básico
|
81
|
+
|
82
|
+
### Inicialização do Cliente
|
83
|
+
|
84
|
+
```ruby
|
85
|
+
# Usando o cliente global
|
86
|
+
client = EvolutionApi.client
|
87
|
+
|
88
|
+
# Ou criando uma instância personalizada
|
89
|
+
client = EvolutionApi::Client.new
|
90
|
+
```
|
91
|
+
|
92
|
+
### Gerenciamento de Instâncias
|
93
|
+
|
94
|
+
```ruby
|
95
|
+
# Listar todas as instâncias
|
96
|
+
instances = client.list_instances
|
97
|
+
|
98
|
+
# Criar uma nova instância
|
99
|
+
client.create_instance("minha_instancia", {
|
100
|
+
qrcode: true,
|
101
|
+
webhook: "https://seu-site.com/webhook"
|
102
|
+
})
|
103
|
+
|
104
|
+
# Conectar uma instância
|
105
|
+
client.connect_instance("minha_instancia")
|
106
|
+
|
107
|
+
# Obter QR Code para conexão
|
108
|
+
qr_code = client.get_qr_code("minha_instancia")
|
109
|
+
|
110
|
+
# Verificar status da instância
|
111
|
+
instance_info = client.get_instance("minha_instancia")
|
112
|
+
puts "Status: #{instance_info['status']}"
|
113
|
+
|
114
|
+
# Desconectar instância
|
115
|
+
client.disconnect_instance("minha_instancia")
|
116
|
+
|
117
|
+
# Remover instância
|
118
|
+
client.delete_instance("minha_instancia")
|
119
|
+
```
|
120
|
+
|
121
|
+
### Envio de Mensagens
|
122
|
+
|
123
|
+
```ruby
|
124
|
+
# Mensagem de texto
|
125
|
+
client.send_text_message("minha_instancia", "5511999999999", "Olá! Como vai?")
|
126
|
+
|
127
|
+
# Mensagem de imagem
|
128
|
+
client.send_image_message(
|
129
|
+
"minha_instancia",
|
130
|
+
"5511999999999",
|
131
|
+
"https://exemplo.com/imagem.jpg",
|
132
|
+
"Legenda da imagem"
|
133
|
+
)
|
134
|
+
|
135
|
+
# Mensagem de áudio
|
136
|
+
client.send_audio_message(
|
137
|
+
"minha_instancia",
|
138
|
+
"5511999999999",
|
139
|
+
"https://exemplo.com/audio.mp3"
|
140
|
+
)
|
141
|
+
|
142
|
+
# Mensagem de vídeo
|
143
|
+
client.send_video_message(
|
144
|
+
"minha_instancia",
|
145
|
+
"5511999999999",
|
146
|
+
"https://exemplo.com/video.mp4",
|
147
|
+
"Descrição do vídeo"
|
148
|
+
)
|
149
|
+
|
150
|
+
# Documento
|
151
|
+
client.send_document_message(
|
152
|
+
"minha_instancia",
|
153
|
+
"5511999999999",
|
154
|
+
"https://exemplo.com/documento.pdf",
|
155
|
+
"Descrição do documento"
|
156
|
+
)
|
157
|
+
|
158
|
+
# Localização
|
159
|
+
client.send_location_message(
|
160
|
+
"minha_instancia",
|
161
|
+
"5511999999999",
|
162
|
+
-23.5505,
|
163
|
+
-46.6333,
|
164
|
+
"São Paulo, SP"
|
165
|
+
)
|
166
|
+
|
167
|
+
# Contato
|
168
|
+
client.send_contact_message(
|
169
|
+
"minha_instancia",
|
170
|
+
"5511999999999",
|
171
|
+
"5511888888888",
|
172
|
+
"João Silva"
|
173
|
+
)
|
174
|
+
```
|
175
|
+
|
176
|
+
### Mensagens Interativas
|
177
|
+
|
178
|
+
```ruby
|
179
|
+
# Mensagem com botões
|
180
|
+
buttons = [
|
181
|
+
{ id: "btn1", body: "Opção 1" },
|
182
|
+
{ id: "btn2", body: "Opção 2" },
|
183
|
+
{ id: "btn3", body: "Opção 3" }
|
184
|
+
]
|
185
|
+
|
186
|
+
client.send_button_message(
|
187
|
+
"minha_instancia",
|
188
|
+
"5511999999999",
|
189
|
+
"Título da mensagem",
|
190
|
+
"Descrição da mensagem",
|
191
|
+
buttons
|
192
|
+
)
|
193
|
+
|
194
|
+
# Lista de opções
|
195
|
+
sections = [
|
196
|
+
{
|
197
|
+
title: "Seção 1",
|
198
|
+
rows: [
|
199
|
+
{ id: "1", title: "Item 1", description: "Descrição 1" },
|
200
|
+
{ id: "2", title: "Item 2", description: "Descrição 2" }
|
201
|
+
]
|
202
|
+
}
|
203
|
+
]
|
204
|
+
|
205
|
+
client.send_list_message(
|
206
|
+
"minha_instancia",
|
207
|
+
"5511999999999",
|
208
|
+
"Título da lista",
|
209
|
+
"Descrição da lista",
|
210
|
+
sections
|
211
|
+
)
|
212
|
+
```
|
213
|
+
|
214
|
+
### Gerenciamento de Chats
|
215
|
+
|
216
|
+
```ruby
|
217
|
+
# Obter todos os chats
|
218
|
+
chats = client.get_chats("minha_instancia")
|
219
|
+
|
220
|
+
# Obter mensagens de um chat
|
221
|
+
messages = client.get_messages("minha_instancia", "5511999999999", {
|
222
|
+
limit: 50,
|
223
|
+
cursor: "cursor_para_paginacao"
|
224
|
+
})
|
225
|
+
|
226
|
+
# Marcar mensagens como lidas
|
227
|
+
client.mark_messages_as_read("minha_instancia", "5511999999999")
|
228
|
+
|
229
|
+
# Arquivar chat
|
230
|
+
client.archive_chat("minha_instancia", "5511999999999")
|
231
|
+
|
232
|
+
# Desarquivar chat
|
233
|
+
client.unarchive_chat("minha_instancia", "5511999999999")
|
234
|
+
|
235
|
+
# Deletar chat
|
236
|
+
client.delete_chat("minha_instancia", "5511999999999")
|
237
|
+
```
|
238
|
+
|
239
|
+
### Gerenciamento de Contatos
|
240
|
+
|
241
|
+
```ruby
|
242
|
+
# Obter todos os contatos
|
243
|
+
contacts = client.get_contacts("minha_instancia")
|
244
|
+
|
245
|
+
# Obter informações de um contato específico
|
246
|
+
contact = client.get_contact("minha_instancia", "5511999999999")
|
247
|
+
|
248
|
+
# Verificar se um número existe no WhatsApp
|
249
|
+
result = client.check_number("minha_instancia", "5511999999999")
|
250
|
+
puts "Número existe: #{result['exists']}"
|
251
|
+
|
252
|
+
# Bloquear contato
|
253
|
+
client.block_contact("minha_instancia", "5511999999999")
|
254
|
+
|
255
|
+
# Desbloquear contato
|
256
|
+
client.unblock_contact("minha_instancia", "5511999999999")
|
257
|
+
```
|
258
|
+
|
259
|
+
### Configuração de Webhooks
|
260
|
+
|
261
|
+
```ruby
|
262
|
+
# Configurar webhook
|
263
|
+
client.set_webhook(
|
264
|
+
"minha_instancia",
|
265
|
+
"https://seu-site.com/webhook",
|
266
|
+
["connection.update", "message.upsert"]
|
267
|
+
)
|
268
|
+
|
269
|
+
# Obter configuração do webhook
|
270
|
+
webhook_config = client.get_webhook("minha_instancia")
|
271
|
+
|
272
|
+
# Remover webhook
|
273
|
+
client.delete_webhook("minha_instancia")
|
274
|
+
```
|
275
|
+
|
276
|
+
## 🎨 Uso com Classes Auxiliares
|
277
|
+
|
278
|
+
### Usando a Classe Instance
|
279
|
+
|
280
|
+
```ruby
|
281
|
+
# Criar uma instância gerenciada
|
282
|
+
instance = EvolutionApi::Instance.new("minha_instancia", client)
|
283
|
+
|
284
|
+
# Verificar se está conectada
|
285
|
+
if instance.connected?
|
286
|
+
puts "Instância conectada!"
|
287
|
+
|
288
|
+
# Enviar mensagem
|
289
|
+
instance.send_text("5511999999999", "Olá!")
|
290
|
+
|
291
|
+
# Obter chats
|
292
|
+
chats = instance.chats
|
293
|
+
|
294
|
+
# Obter contatos
|
295
|
+
contacts = instance.contacts
|
296
|
+
else
|
297
|
+
puts "Instância não conectada"
|
298
|
+
qr_code = instance.qr_code
|
299
|
+
end
|
300
|
+
```
|
301
|
+
|
302
|
+
### Trabalhando com Mensagens
|
303
|
+
|
304
|
+
```ruby
|
305
|
+
# Obter mensagens e processar
|
306
|
+
messages_data = client.get_messages("minha_instancia", "5511999999999")
|
307
|
+
messages = messages_data.map { |msg| EvolutionApi::Message.new(msg, "minha_instancia") }
|
308
|
+
|
309
|
+
messages.each do |message|
|
310
|
+
case message.type
|
311
|
+
when "text"
|
312
|
+
puts "Texto: #{message.text}"
|
313
|
+
when "image"
|
314
|
+
puts "Imagem: #{message.image['url']}"
|
315
|
+
when "audio"
|
316
|
+
puts "Áudio: #{message.audio['url']}"
|
317
|
+
end
|
318
|
+
|
319
|
+
puts "De: #{message.from}"
|
320
|
+
puts "Enviada por mim: #{message.from_me?}"
|
321
|
+
puts "Grupo: #{message.group?}"
|
322
|
+
puts "Timestamp: #{message.timestamp}"
|
323
|
+
end
|
324
|
+
```
|
325
|
+
|
326
|
+
### Trabalhando com Chats
|
327
|
+
|
328
|
+
```ruby
|
329
|
+
# Obter chats e processar
|
330
|
+
chats_data = client.get_chats("minha_instancia")
|
331
|
+
chats = chats_data.map { |chat| EvolutionApi::Chat.new(chat, "minha_instancia") }
|
332
|
+
|
333
|
+
chats.each do |chat|
|
334
|
+
puts "Chat: #{chat.name}"
|
335
|
+
puts "Número: #{chat.number}"
|
336
|
+
puts "Grupo: #{chat.group?}"
|
337
|
+
puts "Não lidas: #{chat.unread_count}"
|
338
|
+
puts "Arquivado: #{chat.archived?}"
|
339
|
+
end
|
340
|
+
```
|
341
|
+
|
342
|
+
### Trabalhando com Contatos
|
343
|
+
|
344
|
+
```ruby
|
345
|
+
# Obter contatos e processar
|
346
|
+
contacts_data = client.get_contacts("minha_instancia")
|
347
|
+
contacts = contacts_data.map { |contact| EvolutionApi::Contact.new(contact, "minha_instancia") }
|
348
|
+
|
349
|
+
contacts.each do |contact|
|
350
|
+
puts "Nome: #{contact.display_name}"
|
351
|
+
puts "Número: #{contact.number}"
|
352
|
+
puts "Business: #{contact.business?}"
|
353
|
+
puts "Verificado: #{contact.verified?}"
|
354
|
+
end
|
355
|
+
```
|
356
|
+
|
357
|
+
## 🚨 Tratamento de Erros
|
358
|
+
|
359
|
+
A gem fornece exceções específicas para diferentes tipos de erro:
|
360
|
+
|
361
|
+
```ruby
|
362
|
+
begin
|
363
|
+
client.send_text_message("instancia_inexistente", "5511999999999", "Olá!")
|
364
|
+
rescue EvolutionApi::NotFoundError => e
|
365
|
+
puts "Instância não encontrada: #{e.message}"
|
366
|
+
rescue EvolutionApi::AuthenticationError => e
|
367
|
+
puts "Erro de autenticação: #{e.message}"
|
368
|
+
rescue EvolutionApi::ValidationError => e
|
369
|
+
puts "Erro de validação: #{e.message}"
|
370
|
+
puts "Detalhes: #{e.errors}"
|
371
|
+
rescue EvolutionApi::RateLimitError => e
|
372
|
+
puts "Rate limit excedido: #{e.message}"
|
373
|
+
rescue EvolutionApi::ServerError => e
|
374
|
+
puts "Erro do servidor: #{e.message}"
|
375
|
+
rescue EvolutionApi::ConnectionError => e
|
376
|
+
puts "Erro de conexão: #{e.message}"
|
377
|
+
rescue EvolutionApi::TimeoutError => e
|
378
|
+
puts "Timeout: #{e.message}"
|
379
|
+
end
|
380
|
+
```
|
381
|
+
|
382
|
+
## 🧪 Testes
|
383
|
+
|
384
|
+
### Executar Testes
|
385
|
+
|
386
|
+
```bash
|
387
|
+
# Executar todos os testes
|
388
|
+
bundle exec rspec
|
389
|
+
|
390
|
+
# Executar testes com coverage
|
391
|
+
bundle exec rspec --format documentation
|
392
|
+
|
393
|
+
# Executar testes específicos
|
394
|
+
bundle exec rspec spec/evolution_api/client_spec.rb
|
395
|
+
```
|
396
|
+
|
397
|
+
### Exemplo de Teste
|
398
|
+
|
399
|
+
```ruby
|
400
|
+
require 'spec_helper'
|
401
|
+
|
402
|
+
RSpec.describe EvolutionApi::Client do
|
403
|
+
let(:client) { described_class.new }
|
404
|
+
|
405
|
+
describe '#list_instances' do
|
406
|
+
it 'returns list of instances' do
|
407
|
+
VCR.use_cassette('list_instances') do
|
408
|
+
response = client.list_instances
|
409
|
+
expect(response).to be_an(Array)
|
410
|
+
end
|
411
|
+
end
|
412
|
+
end
|
413
|
+
|
414
|
+
describe '#send_text_message' do
|
415
|
+
it 'sends text message successfully' do
|
416
|
+
VCR.use_cassette('send_text_message') do
|
417
|
+
response = client.send_text_message(
|
418
|
+
'test_instance',
|
419
|
+
'5511999999999',
|
420
|
+
'Test message'
|
421
|
+
)
|
422
|
+
expect(response['status']).to eq('success')
|
423
|
+
end
|
424
|
+
end
|
425
|
+
end
|
426
|
+
end
|
427
|
+
```
|
428
|
+
|
429
|
+
## 📚 Documentação
|
430
|
+
|
431
|
+
A documentação completa está disponível em:
|
432
|
+
|
433
|
+
- [Documentação da API](https://doc.evolution-api.com/)
|
434
|
+
- [Documentação da Gem (YARD)](https://tiagotobias2003.github.io/evolution_api_ruby/)
|
435
|
+
|
436
|
+
Para gerar a documentação localmente:
|
437
|
+
|
438
|
+
```bash
|
439
|
+
bundle exec yard doc
|
440
|
+
bundle exec yard server
|
441
|
+
```
|
442
|
+
|
443
|
+
## 🤝 Contribuindo
|
444
|
+
|
445
|
+
1. Faça um fork do projeto
|
446
|
+
2. Crie uma branch para sua feature (`git checkout -b feature/AmazingFeature`)
|
447
|
+
3. Commit suas mudanças (`git commit -m 'Add some AmazingFeature'`)
|
448
|
+
4. Push para a branch (`git push origin feature/AmazingFeature`)
|
449
|
+
5. Abra um Pull Request
|
450
|
+
|
451
|
+
### Padrões de Código
|
452
|
+
|
453
|
+
```bash
|
454
|
+
# Verificar estilo do código
|
455
|
+
bundle exec rubocop
|
456
|
+
|
457
|
+
# Corrigir automaticamente
|
458
|
+
bundle exec rubocop -a
|
459
|
+
|
460
|
+
# Verificar apenas arquivos modificados
|
461
|
+
bundle exec rubocop --only-guide-cops
|
462
|
+
```
|
463
|
+
|
464
|
+
## 📄 Licença
|
465
|
+
|
466
|
+
Este projeto está licenciado sob a Licença MIT - veja o arquivo [LICENSE.txt](LICENSE.txt) para detalhes.
|
467
|
+
|
468
|
+
## 🆘 Suporte
|
469
|
+
|
470
|
+
- 📖 [Documentação](https://doc.evolution-api.com/)
|
471
|
+
- 🐛 [Issues](https://github.com/tiagotobias2003/evolution_api_ruby/issues)
|
472
|
+
- 💬 [Discussions](https://github.com/tiagotobias2003/evolution_api_ruby/discussions)
|
473
|
+
|
474
|
+
## 🙏 Agradecimentos
|
475
|
+
|
476
|
+
- [Evolution API](https://github.com/EvolutionAPI/evolution-api) - API incrível para WhatsApp
|
477
|
+
- [HTTParty](https://github.com/jnunemaker/httparty) - Cliente HTTP elegante
|
478
|
+
- [Dry::Configurable](https://dry-rb.org/gems/dry-configurable) - Sistema de configuração
|
479
|
+
- [Dry::Validation](https://dry-rb.org/gems/dry-validation) - Validação de dados
|
480
|
+
|
481
|
+
---
|
482
|
+
|
483
|
+
**Desenvolvido com ❤️ para a comunidade Ruby**
|