Class: ApiBrasil::Services::Messaging::WhatsMeowService

Inherits:
BaseService
  • Object
show all
Defined in:
lib/api_brasil/services/messaging/whats_meow_service.rb

Overview

WhatsMeow API (device-based): POST /whatsmeow/{action}. Exige Authorization: Bearer + DeviceToken.

As actions documentadas estao em ApiBrasil::Generated::Catalog::WHATSMEOW_ACTIONS.

Instance Attribute Summary

Attributes inherited from BaseService

#http

Instance Method Summary collapse

Methods inherited from BaseService

#delete, #download, #get, #initialize, #patch, #post, #put

Constructor Details

This class inherits a constructor from ApiBrasil::Services::BaseService

Instance Method Details

#queue(action, body = nil, options = {}) ⇒ Object

Executa a mesma chamada de forma assincrona via fila.

Returns:

  • (Object)


24
25
26
# File 'lib/api_brasil/services/messaging/whats_meow_service.rb', line 24

def queue(action, body = nil, options = {})
  post("/whatsmeow/#{action.to_s.sub(%r{\A/+}, "")}/queue", body, options)
end

#request(action, body = nil, options = {}) ⇒ Object

Executa POST /whatsmeow/{action}.

Returns:

  • (Object)


17
18
19
# File 'lib/api_brasil/services/messaging/whats_meow_service.rb', line 17

def request(action, body = nil, options = {})
  post("/whatsmeow/#{action.to_s.sub(%r{\A/+}, "")}", body, options)
end