forked from ebhomengo/niki
1
0
Fork 0
niki/vendor/github.com/kavenegar/kavenegar-go/call_maketts.go

25 lines
564 B
Go
Raw Normal View History

2024-08-29 03:26:59 +00:00
package kavenegar
import (
"net/url"
)
//MakeTTS ...
func (call *CallService) MakeTTS(receptor string, message string, params *CallParam) (Message, error) {
v := structToURLValues(params)
v.Set("receptor", receptor)
v.Set("message", message)
return call.CreateMakeTTS(v)
}
//CreateMakeTTS ...
func (call *CallService) CreateMakeTTS(v url.Values) (Message, error) {
u := call.client.EndPoint("call", "maketts")
m := new(MessageResult)
err := call.client.Execute(u.String(), v, m)
if m.Entries==nil{
return Message{},err
}
return m.Entries[0], err
}