-
Notifications
You must be signed in to change notification settings - Fork 20
/
call_tts.go
23 lines (19 loc) · 658 Bytes
/
call_tts.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package alidayu
import "time"
func CallTTS(called_num, called_show_num, tts_code, tts_param string) (success bool, response string) {
if called_num == "" || called_show_num == "" || tts_code == "" {
return false, "Parameter not complete"
}
params := make(map[string]string)
params["app_key"] = AppKey
params["format"] = "json"
params["method"] = Method_CallTTS
params["sign_method"] = "md5"
params["timestamp"] = time.Now().Format("2006-01-02 15:04:05")
params["v"] = "2.0"
params["called_show_num"] = called_show_num
params["called_num"] = called_num
params["tts_code"] = tts_code
params["tts_param"] = tts_param
return DoPost(params)
}