Update send params: phoneNumber -> to
This commit is contained in:
parent
5e2475848e
commit
441a2aebbc
2 changed files with 3 additions and 3 deletions
|
|
@ -35,6 +35,6 @@ class CdrSignalApi
|
||||||
end
|
end
|
||||||
|
|
||||||
def send_message(recipient, text, options = {})
|
def send_message(recipient, text, options = {})
|
||||||
post('send', { phoneNumber: recipient.to_s, message: text }.merge(parse_hash(options)))
|
post('send', { to: recipient.to_s, message: text }.merge(parse_hash(options)))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ class CdrWhatsappApi
|
||||||
end
|
end
|
||||||
ret
|
ret
|
||||||
end
|
end
|
||||||
|
|
||||||
def get(api)
|
def get(api)
|
||||||
url = "#{@api_url}/bots/#{@token}/#{api}"
|
url = "#{@api_url}/bots/#{@token}/#{api}"
|
||||||
JSON.parse(Faraday.get(url, { Accept: "application/json" }).body)
|
JSON.parse(Faraday.get(url, { Accept: "application/json" }).body)
|
||||||
|
|
@ -35,6 +35,6 @@ class CdrWhatsappApi
|
||||||
end
|
end
|
||||||
|
|
||||||
def send_message(recipient, text, options = {})
|
def send_message(recipient, text, options = {})
|
||||||
post('send', { phoneNumber: recipient.to_s, message: text }.merge(parse_hash(options)))
|
post('send', { to: recipient.to_s, message: text }.merge(parse_hash(options)))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue