module Wesender

Constants

VERSION

Public Instance Methods

send(numbers, message, hasSpecialCharacter = false, options = {}) click to toggle source
# File lib/wesender.rb, line 7
def send(numbers, message, hasSpecialCharacter = false, options = {})
  @url = 'https://api.wesender.co.ao'

  response = HTTParty.post("#{@url}/envio/apikey", 
    :body => { 
      :ApiKey => @api_key, 
      :Destino => numbers, 
      :Mensagem => message, 
      :CEspecial => hasSpecialCharacter 
    }.to_json,
    :headers => { 'Content-Type' => 'application/json' } 
  )
  response.parsed_response
end